vbuch / node-signpdf

Simple signing of PDFs in node.
MIT License
700 stars 175 forks source link

How-to make signature visible on PDF #26

Closed vidigas closed 4 years ago

vidigas commented 5 years ago

Hi there,

thanks a lot for the lib.

I have implemented de signature with . a p12 file on the pdf and I am being able to check the signature on the available validation tools, but the signature is no visible on pdf itself when open on regular pdf viewer.

Is it possible to do so? Let a visible mark that the document has being signed.

Thanks

vbuch commented 5 years ago

You can add some "drawing" or text to the document to state that. You can also make the Widget visible. But it won't be clickable in e.g. Chrome. Only in Adobe's products (and probably others who have implementation of pdf signature verification). I hope I'll be able to demonstrate drawing a signature with PdfKit in version 1+. Wont happen for 1.0. And not sure if i'll be able to do it with non-pdfkit code.

vidigas commented 5 years ago

Sorry for the silly question, but how to make the widget visible? First time dealing with pdf's. I'm heaving a bit of a hard time here...

vbuch commented 5 years ago

To make the widget clickable (in Adobe Reader), you need to set a non-zero rect here: https://github.com/vbuch/node-signpdf/blob/develop/src/helpers.js#L35 This will just add some dot-bordered rectangle that is clickable and opens the signatures panel. If you add some text to the same place like "This document is digitally signed" it will llook like you are clicking the text. Those are two totally separate things. Imagine the clickable element being absolutely positioned on top of the text.

arpitbhs commented 5 years ago

@vbuch Hi Valery. Sorry to bump this, but I put a non-zero rect while creating the widget as per your suggestion, to get a clickable area, but it doesn't seem to work for me. Or maybe I'm understanding this wrong. Can you please let me know where and how to update my code to get it working? FYI, the link in your above comment doesn't exist anymore. EDIT: I tested in Adobe Reader, where i can see the clickable areas for other pdfs but not through this code.

PedroS11 commented 4 years ago

I tried to set Rect to non-zero however it doesn't show any widget. Can you give a sample code or some help? Because we can't see the dot-bordered rectangle

jackeyWanFei commented 4 years ago

@vbuch I solved it in My vue project yestoday.

jackeyWanFei commented 4 years ago

But not used in node. I used pdfsign.js library

hmpvillegas commented 4 years ago

But not used in node. I used pdfsign.js library

can you post and explain it here? thanks

jackeyWanFei commented 4 years ago

But not used in node. I used pdfsign.js library

can you post and explain it here? thanks

I'll push it out next few days

jackeyWanFei commented 4 years ago

But not used in node. I used pdfsign.js library

can you post and explain it here? thanks

my project

lucasmassi commented 4 years ago

This lib is top for your issue https://github.com/chunyenHuang/hummusRecipe

lucasmassi commented 4 years ago

Only save one copy of your PDF and use the new with visible signature to be signed.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.

nparween commented 4 years ago

I want a sample code to make the signature visible in existing PDF.

pinkfloydsito commented 4 years ago

Have you found any solution in order to show the signature? I can't make it visible with this library.

lucasmassi commented 3 years ago

Yes, i modified this lib, but I don't remember what I touched specifically.

Em dom., 13 de set. de 2020 às 17:56, Sebastián Cáceres < notifications@github.com> escreveu:

Have you found any solution in order to show the signature? I can't make it visible with this library.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vbuch/node-signpdf/issues/26#issuecomment-691724146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHC5A2O67VU3G3MBUBOCZDDSFUWWBANCNFSM4H362V7Q .

amitraky commented 3 years ago

non-pdfkit

are you implement it without pdfkit