pdf-lib icon indicating copy to clipboard operation
pdf-lib copied to clipboard

Failed to load of Read-only permission PDF

Open ppbl opened this issue 3 years ago • 1 comments

What were you trying to do?

Now there is a read-only permission PDF that I want to split

How did you attempt to do it?

Call the load method directly

await PDFDocument.load(pdfBuffer)

What actually happened?

error - unhandledRejection: Error: Input document to PDFDocument.load is encrypted. You can use PDFDocument.load(..., { ignoreEncryption: true }) if you wish to load the document anyways.

What did you expect to happen?

I have read the readme and encryption related issues and understand that processing encrypted documents is not currently supported

But i realize what I'm meeting is a permissions issue, can it be handled in this case?

How can we reproduce the issue?

Relevant attachments have been uploaded

  1. Screenshot of open the PDF through edge browser
  2. PDF file

Version

1.17.1

What environment are you running pdf-lib in?

Node

Checklist

  • [X] My report includes a Short, Self Contained, Correct (Compilable) Example.
  • [X] I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

image

(There is no link to the pdf file for now, I can provide it if needed)

ppbl avatar Feb 11 '22 09:02 ppbl

I'm having the same issue, did you found a solution @ppbl ?

fharper avatar Jun 17 '22 19:06 fharper