You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration:
latest master / beta 2.4.456
minified-es5 build
various (chromium) based browser-versions (from .49 to .81)
Steps to reproduce the problem:
call pdfjs.getDocument(path_to_invalid_pdf_file) with minified-es5 pdf.js and pdf.worker.js
use e.g. any text-document as "path_to_invalid_pdf_file" (so a valid file, but no pdf-document)
Expected behavior:
PDFDocumentLoadingTask.promise should get rejected with an InvalidPDFException as parameter
Observed behaviour:
code throws an (unhandled) exception "Unhandled promise rejection TypeError: Cannot read property 'message' of undefined"
In current minified-es5 builds calling .getDocument(path_to_invalid_pdf_file) does not correctly "work", it leads to:
Unhandled promise rejection TypeError: Cannot read property 'message' of undefined
at main.js:...
at lib/pdf.min.js:22:64582
at MutationObserver.n (lib/pdf.min.js:22:69954)
instead of rejecting the promise on the PDFDocumentLoadingTask.
This happens with any "invalid" pdf-file (e.g. a text-document instead of a "real" pdf), loading a "valid" pdf however works absolutely correctly (with any version, also minified-es5).
Using a generic-es5 build produces the expected result (an InvalidPDFException is thrown).
The problem itself however seems to originitate in (minified-es5) pdf.worker.js, because using minified pdf.js with non-minified pdf.worker.js behaves as expected?
ps: did not test with es6 (minified)..
The text was updated successfully, but these errors were encountered:
Configuration:
latest master / beta 2.4.456
minified-es5 build
various (chromium) based browser-versions (from .49 to .81)
Steps to reproduce the problem:
call pdfjs.getDocument(path_to_invalid_pdf_file) with minified-es5 pdf.js and pdf.worker.js
use e.g. any text-document as "path_to_invalid_pdf_file" (so a valid file, but no pdf-document)
Expected behavior:
PDFDocumentLoadingTask.promise should get rejected with an InvalidPDFException as parameter
Observed behaviour:
code throws an (unhandled) exception "Unhandled promise rejection TypeError: Cannot read property 'message' of undefined"
In current minified-es5 builds calling .getDocument(path_to_invalid_pdf_file) does not correctly "work", it leads to:
Unhandled promise rejection TypeError: Cannot read property 'message' of undefined
at main.js:...
at lib/pdf.min.js:22:64582
at MutationObserver.n (lib/pdf.min.js:22:69954)
instead of rejecting the promise on the PDFDocumentLoadingTask.
This happens with any "invalid" pdf-file (e.g. a text-document instead of a "real" pdf), loading a "valid" pdf however works absolutely correctly (with any version, also minified-es5).
Using a generic-es5 build produces the expected result (an InvalidPDFException is thrown).
The problem itself however seems to originitate in (minified-es5) pdf.worker.js, because using minified pdf.js with non-minified pdf.worker.js behaves as expected?
ps: did not test with es6 (minified)..
The text was updated successfully, but these errors were encountered: