Bug 50932 - PDFs produced by FOP - Occasionally Prompt for Password
Summary: PDFs produced by FOP - Occasionally Prompt for Password
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.95
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fop-dev
Depends on:
Reported: 2011-03-14 18:41 UTC by Jeffrey Walton
Modified: 2012-04-30 00:11 UTC (History)
0 users

Document properties per evince (162.84 KB, image/png)
2011-03-14 18:43 UTC, Jeffrey Walton

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Walton 2011-03-14 18:41:25 UTC
I believe this is more an interop issue rather than a bug. But it might be a bug shared by both FOP and evince if using a common library.

I have a PDF document (PDF 1.4 format) from the Department of Commerce (US). According to DoC, the document is *not* password protected.

Under evince and Document Viewer (Ubuntu), the document opens correctly. Properties of the document state there is no encryption, no password protection, etc (see attached).

I cannot open the document with other viewers and programs. The other programs and viewers prompt for a password. Other viewers and programs include:
* pdfedit (Ubuntu)
* Foxit Reader (Windows)
* Preview (Mac OS X)
* Google Docs

If FOP could do anything that makes the document more accommodating for other readers, it would be greatly appreciated. 'More accommodating' might include little workarounds, such as repordering on-disk streams.
Comment 1 Jeffrey Walton 2011-03-14 18:43:14 UTC
Created attachment 26771 [details]
Document properties per evince
Comment 2 Andreas L. Delmelle 2011-03-14 18:57:23 UTC
There is unfortunately no fix for 0.95, but I am quite certain this particular issue is fixed in 1.0

Technically, the /ID entry was written twice to the PDF document trailer, and depending on the viewer implementation, the behavior altered between opening with and without password prompt. IIRC, older Acrobat versions also had issues with this, while more recent ones (8+) just opened without complaining.
Comment 3 Jeffrey Walton 2011-03-14 20:15:05 UTC
Here's my workaround:

(1) Convert PDF to PS using 'pdftops' (not 'pdf2ps' as it fails)
(2) Round trip it with either 'pstopdf' or 'ps2pdf'

The upside is that the document went from 32 KB to 17.5 KB when using 'pstopdf'.
Comment 4 Glenn Adams 2012-04-01 15:21:52 UTC
resolved invalid due to lack of information (FO input file, PDF output file, etc)
Comment 5 Glenn Adams 2012-04-30 00:11:22 UTC
batch transition resolved+invalid to closed+invalid