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
Just use any not pdf file to trigger a InvalidPdfException
getDocument().promise.catch((error) => console.log(error); error is undefined when using the minified version of the pdf worker (the one inside pdfjs-dist/build/pdf.worker.min.js).
What is the expected behavior?
The error should be InvalidPDFException {message: "Invalid PDF structure.", name: "InvalidPDFException"} even when using the minified version of the pdf worker.
What went wrong?
Using pdf.worker.es5.js (should be fine with pdf.worker.js too):
reason is not going to be defined when name === 'e'
The text was updated successfully, but these errors were encountered:
Wykks
changed the title
Minified version of pdf worker doesn't raise correct exception
Minified version of pdf worker doesn't send correct exception
Dec 30, 2020
Configuration:
Steps to reproduce the problem:
Just use any not pdf file to trigger a
InvalidPdfException
getDocument().promise.catch((error) => console.log(error);
error
isundefined
when using the minified version of the pdf worker (the one inside pdfjs-dist/build/pdf.worker.min.js).What is the expected behavior?
The error should be
InvalidPDFException {message: "Invalid PDF structure.", name: "InvalidPDFException"}
even when using the minified version of the pdf worker.What went wrong?
Using pdf.worker.es5.js (should be fine with pdf.worker.js too):
Using pdf.worker.min.js:
And here:
pdf.js/src/display/api.js
Lines 2332 to 2350 in 6e55326
reason
is not going to be defined whenname === 'e'
The text was updated successfully, but these errors were encountered: