LibreSign / libresign

✍️ Nextcloud app to sign PDF documents
https://libresign.coop
GNU Affero General Public License v3.0
476 stars 55 forks source link

Add option to present validation info with QR code on a "signature information page" appended to document #2617

Open DazeEnd opened 5 months ago

DazeEnd commented 5 months ago

Is your feature request related to a problem? Please describe. When using the "Add visible footer with signature details" and the "Write QR code on footer with validation URL" options, the footer information and QR code can obscure parts of the document, making that part unreadable. The footer and QR code can also obscure a written signature.

Describe the solution you'd like I would like a new option that does the following when a document is signed:

  1. Append a new "signature information page" the end of the document.
  2. On the signature information page add the validation URL, the validation QR code, and signature metadata including: the time and date of the signature, the Nextcloud username of the signer, a reproduction of the signers signature (if using "click to sign"), the browser user agent of the signer, and the IP address of the signer.

Describe alternatives you've considered N/A

Screenshots QR code obscuring part of the document, and obscuring the signature: image

Files Mock up of a signed document with a signature information page: Signature Information Page Example.pdf

Additional context One advantage of adding this feature is that it would allow a document to be signed several times in sequence. For example, user "Admin" could request a signature from "Signer_1", and then after Signer_1 signed the document, Admin could request another signature from "Signer_2". Since each signature would add a new signature information page to the document, the second signature would not interfere with the first signature (as would currently happen when using the "Add visible footer with signature details" option). This could also act as a temporary workaround that allows two different people who share the same email address to sign a document (until issue #2432 is implemented).

vitormattos commented 5 months ago

Excellent idea!

vitormattos commented 3 months ago

To do this I think that will be necessary create a separated document:

We can't change the signed document adding a new page.

DazeEnd commented 3 months ago

That's too bad. I think a page added to the document would be better, but if it can't be done, a separate document is probably acceptable.

Out of curiosity, why is it that you can add a footer with a QR code to the document upon signing, but you can't add a new page? I would think that an edit is an edit. (But I know almost nothing about the PDF format!)

vitormattos commented 3 months ago

What I do now to add the qrcode

Imagine that we have 2 signers And the first signer sign the document. At this moment, before to sign the file, the footer is added and after, the first signature is made The second signer will sign the document with the footer.

The problem to add a new page

The page with metadata of all signers need to be added in a new page in the end of document. To do this, we need to add the page before the first signature, we need to calculate the coordinates to add the metadata of current signer every when a signer sign the document. This is very complex and we need to have a blocks with metadata with fixed width to be more easy to add a new metadata block.

Possible solutions:

  1. Add a page with metadata by signer. Problem: If we have 10 signers, we will need 10 new pages
  2. Calculate the area of each signature metadata and add the quantity of page that we need to put all metadata of all signers. Problem: too much complex.
  3. Create a separated document after the last signature and add all metadata to this document. Put a link to this document at validation page. Problem: will be this new document signed?
DazeEnd commented 3 months ago

I understand the problem now.

Looking at the solutions you offered, if option 2 is not practical, I think that both option 1 and option 3 are acceptable. However, I favor option 1 (one extra page per signature) because it keeps the signature information attached to the document.

The counterargument is that when a document has 10 signers, then the second signer might get confused when he tries to sign a document with 9 blank pages.

Would it be possible to put a slightly different heading at the top of each page? I’m thinking something like: “Signer 1 Signature Details”, “Signer 2 Signature Details”, “Signer 3 Signature Details”, etc. This would allow you to add all the pages you need at once, and make it clear to signers why there are blank pages in the document being signed. (These headings would replace the “Digitally signed by LibreSign” heading in my original proposal.)