Bug 150828 - Make LibreOffice Writer digital signature functionality available in LibreOffice Draw "File"->"Digital Signatures"->"Sign Existing PDF" (= add signature without altering the document)
Summary: Make LibreOffice Writer digital signature functionality available in LibreOff...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Digital-Signatures Digital-Signature-Lines
  Show dependency treegraph
 
Reported: 2022-09-06 14:11 UTC by Lars Uffmann
Modified: 2023-08-17 07:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
menu entry in writer that triggers the desired functionality (71.31 KB, image/png)
2023-06-13 14:56 UTC, Lars Uffmann
Details
second step needed in writer to place a signature in the desired form (20.70 KB, image/png)
2023-06-13 14:57 UTC, Lars Uffmann
Details
the desired pop-up with the possibility to choose a png/jpg for the signature besides the signing certificate (19.54 KB, image/png)
2023-06-13 14:57 UTC, Lars Uffmann
Details
resulting signed document with signature line as expected & as desired in Draw for existing PDFs (63.86 KB, image/png)
2023-06-13 14:58 UTC, Lars Uffmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Uffmann 2022-09-06 14:11:24 UTC
Description:
When signing an existing PDF document with LibreOffice (Draw), the only option without altering the document (and invalidating previous signatures) is to "silently" sign the document or use the preconfigured "signature line" (the one that Draw inserts): The signature will be digitally present & validated, but there is no option to insert e.g. a signature scan or manually format the preconfigured "stamp".

I am proposing a feature extension to Draw -> Insert -> Signature Line where a pop-up dialogue appears similar to the same functionality in Writer, that allows to manually edit some fields (e.g. clear text name / organisation), select/unselect which fields to display (e.g. date) and to select an image to place into the signature stamp.

It would be very similar to the existing feature of "Insert signature line" in LO Writer, except that the latter feature is only properly working for .odt documents, and not for existing PDFs. And the image can only be inserted with the "sign" context menu of a previously inserted signature line.


Steps to Reproduce:
1. open Writer
2. choose "File -> Digital Signatures -> Sign Existing PDF"
3. Select an existing PDF
4. In Draw, choose "Insert -> Signature Line"
5. --> no pop-up for the signature field properties

Actual Results:
A document is created with a valid signature, but no image of a handwritten signature

Expected Results:
A pop-up menu that allows to configure properties for the signature field (and which ones to display), as well as selecting an image to use for the signature stamp


Reproducible: Always


User Profile Reset: No



Additional Info:
N/A
Comment 1 Rafael Lima 2022-09-06 14:26:57 UTC
Seems an interesting idea... Let's hear from the UX team.
Comment 2 Heiko Tietze 2022-09-07 09:13:59 UTC
Don't see why this be blocked. Any reason, Samuel?
Comment 3 Gabor Kelemen (allotropia) 2022-09-07 09:41:48 UTC
This sounds like a duplicate of bug 126207

*** This bug has been marked as a duplicate of bug 126207 ***
Comment 4 Lars Uffmann 2022-09-07 16:05:02 UTC
With all due respect, I read all other bug reports containing "sign" before submitting, I saw this, and - while related - decided it is on a different issue:

The other bug report is on how draw exports a signature line inserted while *editing* a pdf.

My report is on the signature *correctly* exported as pdf signature field when using draw to "sign existing pdf", and how this correct export does not allow to modify the appearance of the visible signature line / stamp.

If anything, the other bug is kind of already resolved (functionality is there to create a pdf signature field) but in the correct process to sign existing PDFs, also would require the feature requested in my submission.

With this explanation I would appreciate if you could remove the tag of this submission being a duplicate.

Thank you!
Comment 5 Heiko Tietze 2023-06-13 10:06:40 UTC
(In reply to Lars Uffmann from comment #4)
> The other bug report is on how draw exports a signature line inserted while
> *editing* a pdf.

How about hanging the summary to "Provide Signature Line feature on other modules too" - and improve the dialog/feature?
Comment 6 Lars Uffmann 2023-06-13 11:27:30 UTC
(In reply to Heiko Tietze from comment #5)
> (In reply to Lars Uffmann from comment #4)
> > The other bug report is on how draw exports a signature line inserted while
> > *editing* a pdf.
> 
> How about hanging the summary to "Provide Signature Line feature on other
> modules too" - and improve the dialog/feature?

To be honest, I don't know what you mean by "hanging the summary", to the point I don't get what you are asking me.

In the end, how it's implemented is not so important to me personally, as long as there is a way to create a signature "stamp" with a custom design, being able to select from the relevant fields:
* Name
* Organisation
* Signature Date
* jpg or png (of a real signature)

(and whatever else I may have forgotten)
Comment 7 Heiko Tietze 2023-06-13 13:24:57 UTC
(In reply to Lars Uffmann from comment #6)
> To be honest, I don't know what you mean by "hanging the summary"...

+c ;-)

The summary (the title you gave this report) reads as this is about PDF signing, therefore comment 3. And my proposal turns your request into enhancing an existing feature, which is always better than adding something. If the signature line as known from Word would be available in other modules such as Draw it is an improvement. And from there we could iterate. What do you think?
Comment 8 Lars Uffmann 2023-06-13 14:19:57 UTC
(In reply to Heiko Tietze from comment #7)
> (In reply to Lars Uffmann from comment #6)
> > To be honest, I don't know what you mean by "hanging the summary"...
> 
> +c ;-)

Oh - I completely mis-read that, and didn't make the mental link.

> The summary (the title you gave this report) reads as this is about PDF
> signing, therefore comment 3.

Well - the emphasis here was on the *stamp* and *existing* PDF document. It appears that was misunderstood.

> And my proposal turns your request into an existing feature, which is always better than adding something.

Let me think of the proper wording to not be misunderstood again... I was hoping that the feature description in the "bug" report was enough to make it clear.

> the signature line as known from Word would be available in other modules
> such as Draw it is an improvement. And from there we could iterate. What do
> you think?

On it within the next minutes
Comment 9 Lars Uffmann 2023-06-13 14:56:42 UTC
Created attachment 187889 [details]
menu entry in writer that triggers the desired functionality
Comment 10 Lars Uffmann 2023-06-13 14:57:18 UTC
Created attachment 187890 [details]
second step needed in writer to place a signature in the desired form
Comment 11 Lars Uffmann 2023-06-13 14:57:53 UTC
Created attachment 187891 [details]
the desired pop-up with the possibility to choose a png/jpg for the signature besides the signing certificate
Comment 12 Lars Uffmann 2023-06-13 14:58:36 UTC
Created attachment 187892 [details]
resulting signed document with signature line as expected & as desired in Draw for existing PDFs
Comment 13 Lars Uffmann 2023-06-13 15:01:42 UTC
Edit 2023-06-13: changed title as suggested by Heiko in https://bugs.documentfoundation.org/show_bug.cgi?id=150828#c7

New title: Make LibreOffice Writer digital signature functionality available in LibreOffice Draw "File"->"Digital Signatures"->"Sign Existing PDF" (= add signature without altering the document)

Old title: "Place digital signatures in an existing PDF document with a visible stamp (e.g. signature scan)"

Added attachments to referenced Writer functionality:
1 - place signature field into document
2 - sign newly placed signature field
3 - choose name & signature pic & signing certificate
4 - resulting signed document

----
Currently, in LO Draw, the signing functionality is implemented as follows:
"File"->"Digital Signatures"->"Sign Existing PDF"

Then, multiple options are:
1) in the top blue bar "This PDF is open in read-only mode to allow signing the existing file: choose "Sign Document", in the pop-up choose choose "Sign Document" again, and choose a certificate.
Result 1: Signature is added to the document, but no visible indicator is placed on any page

2) "Insert"->"Signature Line" -> choose the desired area on a desired page -> in the pop-up, select the signing certificate, "Select" -> "Finish Signing"
Result 2: A stamp is added to the selected area, stating
  "Digitally signed by:
   (certificate signer name)
   Date: dd/mm/yyyy"
  with a PDF icon as the background image.

3) "File"->"Signature Line" -> same as 2)
Comment 14 Alex Thurgood 2023-06-13 15:52:34 UTC
(In reply to Lars Uffmann from comment #13)

 
> 2) "Insert"->"Signature Line" -> choose the desired area on a desired page
> -> in the pop-up, select the signing certificate, "Select" -> "Finish
> Signing"
> Result 2: A stamp is added to the selected area, stating
>   "Digitally signed by:
>    (certificate signer name)
>    Date: dd/mm/yyyy"
>   with a PDF icon as the background image.
> 


This is similar to the way it works in Adobe Reader (on macOS at least, I can't speak for Windows) for trusted key signatures, i.e. the user is invited to draw an area on the page into which the digital signature is inserted with a timestamp after entering the passphrase key or PIN code.
Comment 15 Lars Uffmann 2023-06-13 16:03:30 UTC
(In reply to Alex Thurgood from comment #14)
> (In reply to Lars Uffmann from comment #13)
> 
>  
> > 2) "Insert"->"Signature Line" -> choose the desired area on a desired page
> > -> in the pop-up, select the signing certificate, "Select" -> "Finish
> > Signing"
> > Result 2: A stamp is added to the selected area, stating
> >   "Digitally signed by:
> >    (certificate signer name)
> >    Date: dd/mm/yyyy"
> >   with a PDF icon as the background image.
> > 
> 
> 
> This is similar to the way it works in Adobe Reader (on macOS at least, I
> can't speak for Windows) for trusted key signatures, i.e. the user is
> invited to draw an area on the page into which the digital signature is
> inserted with a timestamp after entering the passphrase key or PIN code.


Similar, but missing one crucial bit: in Adobe Reader (both on MacOS and Windows), you can create a signature template, for which you can choose e.g. a custom signature image.

Adobe Reader permits to toggle signature fields to be displayed in the document:

[x] Common Name
[x] Distinguished Name
[x] Reason (for signing)
[x] Location
[x] Date
and an option to show a graphic (like LO Writer does)
Comment 17 Alex Thurgood 2023-06-14 10:35:07 UTC
(In reply to Lars Uffmann from comment #15)


> Similar, but missing one crucial bit: in Adobe Reader (both on MacOS and
> Windows), you can create a signature template, for which you can choose e.g.
> a custom signature image.
> 
> Adobe Reader permits to toggle signature fields to be displayed in the
> document:
> 
> [x] Common Name
> [x] Distinguished Name
> [x] Reason (for signing)
> [x] Location
> [x] Date
> and an option to show a graphic (like LO Writer does)

I'm all in favour of that flexibility !