Created attachment 129812 [details]
PDF files which will not function
the function to sign an existing PDF is a very good feature and I tried it with different PDF-files. The result has shown for me that the signing-procedure only function with PDF's which was created by LibreOffice. With other PDF I can select a signature but this will not added to the PDF and the signature list of the main signing dialog remained empty. Futhermore neither an error, warning nor other information is displayed. The only thing that happens, that the PDF is damanaged after this action.
You find an example PDFs, which will not function, before and after the signing process in the attachment.
What is the reason? Am I doing something wrong?
Thank you in advance for your effort.
Thanks for reporting.
What difference do you see between PDF files created with LibreOffice or not?
I see that both grow some +50k in file size.
But I've no application however (as far as I know..) showing met signatures in PDF.
Ciao - Cor
I can reproduce this with LibreOffice 5.3.0~rc1 (from Debian): signing the provided PDF files doesn't work and trying to do so produces a PDF file only including page 2 (and missing page 1).
As a workaround, opening the PDF and exporting it again allows to sign the file (then also via the "Sign existing PDF" option). However this should lose all signatures already present.
My suspicion is that this is related to the PDF version: the provided `test_before.pdf` is PDF-1.6; the files I could sign were PDF-1.4 or before. This blog post suggests that it should work with newer PDF versions as well: http://vmiklos.hu/blog/pdf-sign.html, but maybe there are still some bugs in this new feature?
[ Added vmiklos to the CC list ]
Dear Bug Submitter,
This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.
For more information about our NEEDINFO policy please read the
wiki located here:
If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
Thank you for helping us make LibreOffice even better for everyone!
I confirm the problem in Version: 184.108.40.206.alpha0+
Build ID: 368b583b992f2e9cad46c2362c9529a07c36d7a9
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2;
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-08-10_02:55:46
Locale: nl-NL (nl_NL.UTF-8); Calc: group
and in 220.127.116.11 on Win 10-64 (6.19)
when trying to sign the PDF file from attachment 129812 [details], I do
- select a certificate in the dialog Select Certificate
- click OK
> but then do not see the signature in the dialog Digital Signatures
(After closing and reopening the PDF for signing, the certificate is shown)
so this possibly consists of two problems:
- version 1.6 problem
- multi page problem (for signing existing PDF - not on PDF export / or PDF's from LibreOffice - so possibly also related to PDF version 1.6?)
Maybe is a problem with that file.
Trying to validate your document using this online test. fail
But, if you export using libre office. this resulted file. passed the test.
Created attachment 146029 [details]
simple example document where signing succeeds/fails
I've attached simpler PDF documents with just the world "Hallo." that show the documented problem. The pdfTeX source is also included.
I can sign pdf15uncompressed.pdf (which sets '\pdfobjcompresslevel=0') without problems. The signature is shown as valid by libreoffice-writer.
Signing pdf15compressed.pdf (which uses the default \pdfobjcompresslevel setting) fails and produces an invalid PDF (that cannot be opened using either evince or libreoffice-writer).
I tried with libreoffice-writer 1:6.1.3~rc1-1 and 1:6.2.0~alpha1-1 (from Debian)
Ansgar, if you are right, than we should update the title with "compressed PDF".
Your PDF's are version 1.5.
Although you already found that it should work with newer PDF versions, can you please try to create version 1.6, to be sure?
I tried to find a method to test whether PDF is compressed, only hint is to use:
strings your.pdf | grep /Filter
But I don't find it reliable.
Timur, I tried changing \pdfminorversion=5 to \pdfminorversion=6. This shows the same problems with signing the uncompressed version.
The PDF 1.5/1.6 files generated this way by pdfTeX are almost identical. The only difference are version number, timestamps and some ID:
-/ID [<85B2B94E82913D769D6C5843FF158106> <85B2B94E82913D769D6C5843FF158106>]
+/ID [<3183843648EC5FDFF762CA8F3B1A7532> <3183843648EC5FDFF762CA8F3B1A7532>]
I don't know anything about the PDF file format so cannot say how to identify files using object compression. I just found the "\pdfobjcompresslevel=0" option when trying to generate a PDF Libreoffice could sign earlier this month.
*** Bug 120892 has been marked as a duplicate of this bug. ***
Possible example attachment 161609 [details].