Cannot print PDF with invalid signature

Asked by Aziz Chaouch on 2019-08-19


I'm using qpdfview 0.4.18-1 on Manjaro and I cannot print PDF with invalid signature. When I try to print such a document, I get an error message "Print Error. There was a problem processing document XXX" and the print job is stopped. This doesn't happen with other PDF viewers such as e.g. epdfviewer. On the other hand qpdfview can print without any issue if the signature is valid.

I can build a PDF with an invalid signature by combining two PDF with different valid signatures using e.g. PDF Arranger. The combined PDF then has an invalid signature. I can check if a PDF has an invalid signature by opening it in LibreOffice Draw. If the PDF has an invalid signature, LibreOffice will complain about it. However it is still possible to print it from LibreOffice Draw. It is only when such PDF is opened in qpdfview that it is not possible to print it.

Not sure whether this is a bug or not but do you know if this behaviour can be corrected somehow?


Question information

English Edit question
qpdfview Edit question
No assignee Edit question
Solved by:
Adam Reichold
Last query:
Last reply:
Adam Reichold (adamreichold) said : #1

Hello Aziz,

let's is not exactly a bug, but rather a known limitation of qpdfview not preprocessing PDF for printing at all, i.e. for printing qpdfview basically acts like a frontend to the "lp" command. So to determine why the processing fails, you could try to increase the log levels of CUPS and just print via "lp" which should produce the same results. My best guess is that something within cups-filters is unable to process the file.

Long-term, I would qpdfview to strip decryption and signatures before printing the PDF so that this becomes a non-issue, c.f. #1476693 but for the now the upstream work to do the actual stripping is stalled on my end.

Best regards,

Aziz Chaouch (kilou) said : #2

Hi Adam,

thanks for your reply! You're right, using the lp command to print the file produces the same results. I tried to view the cups log file but can't find anything meaningful to me. It is strange because other viewers do not have this problem although they also use the cups service (and cups-filters I guess). Anyway since this is a known limitation of qpdfview, I'll wait until there is a fix from upstream. I can live with LibreOffice Draw for the occasional times I need to print a PDF with invalid signature. For all other situations, qpdfview works great! Thanks for your help and work! Kind regards,


Best Adam Reichold (adamreichold) said : #3

Hello again,

other viewers are usually not affected as they "flatten" the PDF into PostScript before printing which qpdfview leaves to cups-filters. However, you can simulate this process by e.g. running pdftops from poppler-utils to transform the file into plain PostScript document and print that (using "lp", "qpdfview" or whatever you prefer).

Best regards,

Aziz Chaouch (kilou) said : #4

Great, this solves the issue for me! Thanks a lot ;)

Aziz Chaouch (kilou) said : #5

Thanks Adam Reichold, that solved my question.