Bug 54781 - Support encrypted pdf files in pdfseparate
Summary: Support encrypted pdf files in pdfseparate
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 15:38 UTC by Matthew Lenz
Modified: 2012-09-17 21:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
separate also encrypted PDF (5.41 KB, patch)
2012-09-14 13:17 UTC, Thomas Freitag
Details | Splinter Review

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.