Bug 54781

Summary: Support encrypted pdf files in pdfseparate
Product: poppler Reporter: Matthew Lenz <matthew>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: separate also encrypted PDF

Description Matthew Lenz 2012-09-11 15:38:20 UTC
I have a pdf that pdfseparate (0.20.1 and 0.20.4) doesn't like (complains that it is encrypted but it isn't) but pdftoppm processes just fine.

Using the following commmands:

FAILS
pdfseparate cruise-docs.pdf export-%d.pdf

WORKS
pdftoppm -r 300 cruise-docs.pdf export

PDF:

https://www.box.com/s/12rqgsxf94f0ibcm5t5h
Comment 1 Albert Astals Cid 2012-09-11 17:47:06 UTC
The document is encrypted by the PDF speak and that makes it not supported by pdfseparate, there is no bug here, just a missing feature
Comment 2 Matthew Lenz 2012-09-11 17:55:01 UTC
(In reply to comment #1)
> The document is encrypted by the PDF speak and that makes it not supported by
> pdfseparate, there is no bug here, just a missing feature

"by the PDF speak"?  What is that? :)
Comment 3 Albert Astals Cid 2012-09-11 18:07:58 UTC
by the PDF speak -> "in the PDF language" -> "in the PDF specification", etc etc

Just open the pdf file with a text editor and see how it says 
/Encrypt 44 0 R


That means the PDF is encrypted (even if it does not ask for a password since the password is "")
Comment 4 Thomas Freitag 2012-09-14 13:17:52 UTC
Created attachment 67154 [details] [review]
separate also encrypted PDF

The patch based on Fabio's support to save encrypted files, so thanks to Fabio!
Comment 5 Albert Astals Cid 2012-09-16 15:13:06 UTC
Move the code you added to XRef::XRef(Object *trailerDictA) to XRef::init ?
Comment 6 Thomas Freitag 2012-09-16 17:04:59 UTC
(In reply to comment #5)
> Move the code you added to XRef::XRef(Object *trailerDictA) to XRef::init ?

Sounds reasonable, but then we need to regtest it, don't we? The methods I changed in XRef.cc are just called by pdfseparate... :-)
Comment 7 Albert Astals Cid 2012-09-17 21:14:08 UTC
Pushed to master. Will be in poppler 0.22

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.