Download it now!
Bug 126207 - Export signature line as PDF signature field
Summary: Export signature line as PDF signature field
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Digital-Signatures
  Show dependency treegraph
 
Reported: 2019-07-03 09:53 UTC by Gellért Gyuris
Modified: 2020-11-06 21:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Signature line example (signed) (113.29 KB, application/vnd.oasis.opendocument.text)
2019-07-03 09:55 UTC, Gellért Gyuris
Details
Signature line example (signed) PDF (189.89 KB, application/pdf)
2019-07-03 09:55 UTC, Gellért Gyuris
Details
Signature line example (signed) with option "Create PDF form" (312.94 KB, application/pdf)
2019-07-03 09:56 UTC, Gellért Gyuris
Details
Empty signature line example (124.67 KB, application/pdf)
2019-07-03 09:56 UTC, Gellért Gyuris
Details
Empty signature line example signed with Adobe Reader (145.76 KB, application/pdf)
2019-07-03 09:57 UTC, Gellért Gyuris
Details
Empty signature line example (LaTeX digsig) (19.77 KB, application/pdf)
2019-07-03 09:58 UTC, Gellért Gyuris
Details
Empty signature line example (LaTeX eform) (12.81 KB, application/pdf)
2019-07-03 09:59 UTC, Gellért Gyuris
Details
Signature line example (signed with other signature) PDF (362.47 KB, application/pdf)
2019-07-03 13:55 UTC, Gellért Gyuris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gellért Gyuris 2019-07-03 09:53:43 UTC
Description:
Signature line should be exported as visible PDF signature field when "Create PDF form" option is enabled.

Steps to Reproduce:
1. Open attached "Signature line example (signed).odt". There is a filled signature line.
2. Export it to PDF with "Create PDF form" option enabled and sign the PDF on Export.
3. Exported signature line is just a drawing object, not a PDF signature field.

Actual Results:
As Miklós Vajna explained in 117109#c2 currently LibreOffice on PDF exporting (or PDF signing) place signature widget on first page as 0×0 sized object.

Expected Results:
Signature line should be exported as PDF signature field:

1. Export as PDF > Create PDF form option disabled
Keep current behavior.
Example: "Signature line example (signed).pdf"

2. Export as PDF > Create PDF form option enabled and signature line is signed (and on export Digital Signatures are filled)
- Replace the signature line with a real PDF signature field
- fill it with a PNG replacement of current appearance 
- and place it on the same place and same dimension.
Example: "Signature line example (signed) (with option Create PDF form).pdf" Currently all form elements are exported as PDF annotations. This is the expected result. But signature line is a simple draw object. It should be a PDF annotation, or as Miklós write a PDF widget.

3. Export as PDF > Create PDF form option enabled and signature line is empty (and PDF isn’t signed)
Replace the signature line with an empty PDF signature line. This can be filled out in a PDF editor like Acrobat Reader.
This is a missed function. There is only 2 FOSS implementation in LaTeX: eform (https://ctan.org/pkg/eforms) and digsig (http://home.htp-tel.de/lottermose2/tex/dist/digsig.sty)
Examples:
- "Empty signature line example (empty).pdf" – This file is originally created in LibreOffice and PDF signature field is added in Adobe Acrobat.
- "Empty signature line example (empty) (signed in Adobe Reader)" – Previous example signed in Adobe Reader.
- "digsig.pdf" and "eform.pdf" – These files are created with LaTeX and contain only one empty PDF signature field. See them with Adobe Reader. 

4. PDF signing:
Keep current behavior - there is no signature line.

And a closing comment. If the signature line is filled (document is signed) why we need to add signature details again on PDF export? This should be automatically _and unchangeable_ while the document is unmodified. I think in the current behavior someone can sign the document and someone else can export to PDF with another key... In this case the signed key and the displayed key is different. Am I correct?


Reproducible: Always


User Profile Reset: No



Additional Info:
According to #119017 and #117109
Comment 1 Gellért Gyuris 2019-07-03 09:55:26 UTC
Created attachment 152523 [details]
Signature line example (signed)
Comment 2 Gellért Gyuris 2019-07-03 09:55:53 UTC
Created attachment 152524 [details]
Signature line example (signed) PDF
Comment 3 Gellért Gyuris 2019-07-03 09:56:27 UTC
Created attachment 152525 [details]
Signature line example (signed) with option "Create PDF form"
Comment 4 Gellért Gyuris 2019-07-03 09:56:55 UTC
Created attachment 152526 [details]
Empty signature line example
Comment 5 Gellért Gyuris 2019-07-03 09:57:32 UTC
Created attachment 152527 [details]
Empty signature line example signed with Adobe Reader
Comment 6 Gellért Gyuris 2019-07-03 09:58:13 UTC
Created attachment 152528 [details]
Empty signature line example (LaTeX digsig)
Comment 7 Gellért Gyuris 2019-07-03 09:59:12 UTC
Created attachment 152529 [details]
Empty signature line example (LaTeX eform)
Comment 8 Miklos Vajna 2019-07-03 11:45:58 UTC
CC Samuel who knows most about this signature line feature.
Comment 9 Samuel Mehrbrodt (allotropia) 2019-07-03 11:58:00 UTC
Sounds feasible.

Basically unsigned signature lines should be exported as PDF signing fields which can later be signed.

When exporting a PDF from a document with a signed signature line, an option should be added to sign the PDF and write the signatureline as a signed PDF signing field.
Comment 10 Gellért Gyuris 2019-07-03 13:55:48 UTC
Created attachment 152536 [details]
Signature line example (signed with other signature) PDF

Yes Samuel, that is what I suggested :-). Thanks.

Reply for the closing comment. Here is a sample. The document was signed with "...@ujevangelizacio.hu" signature (see previous ODT file). But on exporting to PDF this time the PDF is signet with "...@protonmail.com" signature. 

So the fake visible signature is "...@ujevangelizacio.hu" and the real signature is "...@protonmail.com".

I think, this should be prevent. With this function we can eliminate this confusing behavior.
Comment 11 Ofca 2020-11-06 21:29:37 UTC
Hi!

Is there any progress on this? With current worldwide events, electronic signatures are on the rise and currently there's no easy way to create non-TeX templates that convert to a PDF with empty Digital Signature field that can be signed at a later time. At first glance this doesn't seem like a difficult task for someone that already has experience with LibreOffice's PDF writer. TeX extension that was mentioned earlier located at http://home.htp-tel.de/lottermose2/tex/dist/digsig.sty seems focused on just this one task.

Thanks.