Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypted PDF files #2635

Closed
BasixKOR opened this issue Jan 28, 2022 · 5 comments
Closed

Encrypted PDF files #2635

BasixKOR opened this issue Jan 28, 2022 · 5 comments

Comments

@BasixKOR
Copy link

Currently loading encrypted PDF files fails with this message:

glib: Document is encrypted

Could we have a password provided via arguments?

@jcupitt
Copy link
Member

jcupitt commented Jan 28, 2022

Hi @BasixKOR,

Sure, why not. Could you supply a test PDF?

@BasixKOR
Copy link
Author

I can't give you the PDF file I have since it contains my private information but you can drop any PDF files here and get a example of protected PDFs: https://smallpdf.com/protect-pdf/

@jcupitt
Copy link
Member

jcupitt commented Jan 28, 2022

I made an encryted PDF for testing:

nipguide-protected.pdf

Password "banana". Encrypted with AES128 I think.

jcupitt added a commit that referenced this issue Jan 28, 2022
loads at least AES128-encrypted PDFs

pdfiumload needs a similar feature

see #2635
@jcupitt
Copy link
Member

jcupitt commented Jan 28, 2022

OK, seems to work. I tested with:

vips copy nipguide-protected.pdf[password=banana,page=12] x.png

To make:

x

This will be in 8.13.

pdfiumload needs a similar option.

@jcupitt
Copy link
Member

jcupitt commented Jan 28, 2022

... I did pdfium too. I'll close.

Thanks for the suggestion!

@jcupitt jcupitt closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants