"Error: Input document to PDFDocument.load
is encrypted ..." (but pdf.js
and other readers can read the file without password)
#75
Labels
What were you trying to do?
I was trying to load a document using
PDFDocument.load
, but it threw this Error.The PDF document can be loaded without any issues on
pdf.js
and in other PDF readers.Here is a sample document that fails to load here:
sample.pdf
How did you attempt to do it?
I downloaded my document from Adobe Sign, then uploaded it to the webapp where
pdf-lib
is available.I then wanted to edit it using
pdf-lib
, for which I loaded the document withPDFDocument.load
as I do for any other document.This throws the error:
Allowing
ignoreEncryption
does not fix this issue, as it prevents the document from being parsed properly (it returns all blank pages).What actually happened?
I got the error mentioned above.
What did you expect to happen?
I expected the document to load without any issues into
pdf-lib
.I expected this to work as I saw this comment here, stating that this fork should have fixed the issue: Hopding#1601 (comment)
How can we reproduce the issue?
Just run
PDFDocument.load()
over the document I shared above (which I will share here as well).4ffefced-d7bc-4b46-bead-28cd1710534b original.pdf
Version
2.2.3
What environment are you running pdf-lib in?
Browser
Checklist
Additional Notes
No response
The text was updated successfully, but these errors were encountered: