Move PDF metadata extraction into a separate service
In order to make it easier to change the document metadata retrieved for PDFs, this commit moves the code responsible for extracting that metadata into a separate (tested) service. We also remove our reliance on the `PDFViewerApplication.loading` which was removed from the bundled version of PDF.js in August 2015. Instead we simply check to see if `PDFViewerApplication.documentFingerprint` is available. If not, we listen for the first 'documentload' event before extracting metadata from the `PDFViewerApplication`.
Showing
Please register or sign in to comment