unable to print password protected PDF documents

Bug #1476693 reported by Juergen Daubert on 2015-07-21
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Adam Reichold

Bug Description

Looks like qpdfview cannot print documents that are protected with passwords, even though qpdfview shows the docs without issues. I have no problems to print unprotetced PDF's with qpdfview.

This is on a CRUX linux system with CUPS as printer spooler. The error mesage:

D [20/Jul/2015:18:49:31 +0200] [Job 555] Set job-printer-state-message to "loadFilename failed: /var/spool/cups/d00555-001: invalid password", current level=ERROR

The same document prints just fine with epdfview, so my guess is that the problem is on the qpdfview side.


Changed in qpdfview:
status: New → Triaged
importance: Undecided → Medium
Adam Reichold (adamreichold) wrote :

Hello Juergen,

thank you for taking the time to report this! I have looked into it and the root cause seem to be that we send PDF documents directly to CUPS where most other readers convert them to PostScript first. (This was a deliberate decision since PDF is supposed to be the default format for never CUPS filter pipelines.) But the CUPS API does not seem to give us any way to pass the password along so it can't open and decrypt the file for printing.

I think the proper solution is that we decrypt the file before printing, prompting for the password again since by giving it to the printing system, you have to acknowledge that it will process the data unencrypted. However, Poppler does not seem to have an API to store a decrypted version of a PDF document yet. (It will of course decrypt when converting to PostScript.) But it should be possible to add such an interface.

The alternative would be to convert to PostScript, either always or at least if the file is encrypted which I personally do not like too much, but which can be implemented using the status quo.

Best regards, Adam.

Juergen Daubert (jue) wrote :

Hi Adam,

thanks for your quick response. Might be worth to take a look at epdfview, which uses poppler/poppler-glib as well. Epdfview is unmaintained and broken on other parts, but printing encrypted documents works.

best regards

Adam Reichold (adamreichold) wrote :


the approach of epdfview is clear: It converts PDF documents to PostScript for printing was usually a necessity back then. This is my fallback solution, but I would prefer not to do that since it is expensive and unnecessary. I just need the necessary interfaces for saving an unencrypted copy.

Best regards, Adam.

Adam Reichold (adamreichold) wrote :

Submitted an RFC with a proposal for an API extension to the Poppler mailing list...

Changed in qpdfview:
status: Triaged → In Progress
Changed in qpdfview:
assignee: nobody → Adam Reichold (adamreichold)
Changed in qpdfview:
milestone: none → 0.4.17
James Shriner (hedon-james) wrote :

I have recently discovered qpdfview, having heard good things about it. After installing and using for awhile, I must agree that it is excellent! A better solution than Evince, Adobe, or FoxIt (my former favorite).

However, I have the same issue as the OP...cannot print password protected PDFs. I have to switch to FoxIt for that. Noting this bug is almost 2 years old, I'm simply chiming in to say "me too...still". If it help to know, I have qpdfviewer v.0.4.14 installed on Lubuntu 16.04, via Lubuntu repo.

Other than this 1 issue, I'd say qpdfviewer is just about perfect, FWIW! Thank you for this software!

Adam Reichold (adamreichold) wrote :

Hello James,

this issue is blocked on the related change within upstream Poppler. I already submitted a patch once but I made a mistake and hence it got reverted. Even though I fixed it almost immediately, the maintainers moved on in their bug and patch queue. I probably have to rebase and resubmit the change eventually, but my time is currently very limited...

Best regards, Adam.

Juergen Daubert (jue) wrote :

Hello Adam,

any chance to get a new version with a fix for this bug soon?

Thanks and best regards

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions