Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a signature box to the signed pdf #226

Open
Chunkygoo opened this issue Feb 10, 2024 · 8 comments
Open

Add a signature box to the signed pdf #226

Chunkygoo opened this issue Feb 10, 2024 · 8 comments
Labels

Comments

@Chunkygoo
Copy link

Chunkygoo commented Feb 10, 2024

Is there a way to add a "signature box" to the signed pdf where if clicked on, shows the information of the certificate? This brings up a signature box that's similar to Adobe reader's signature panel.

Example:
image

Link:

https://ironpdf.com/blog/compare-to-other-components/add-digital-signature-topdf-in-csharp-using-itextsharp/

@vbuch vbuch added the visual label Feb 12, 2024
@vbuch
Copy link
Owner

vbuch commented Feb 12, 2024

Hi,
1: If the signature is valid or not is not supposed to be rendered in the document. That is for the reader (Adober Reader or other) to verify and tell you.
2: Adding a box is something standard. Here is an example of how that's done with PDFKit. Also have a look at the issues tagged "visual".

@Chunkygoo
Copy link
Author

Hi,

1: If the signature is valid or not is not supposed to be rendered in the document. That is for the reader (Adober Reader or other) to verify and tell you.

2: Adding a box is something standard. Here is an example of how that's done with PDFKit. Also have a look at the issues tagged "visual".

Thanks for the reply. I agree with you on 1, but the link I attached seems to be able to link the box to Adobe reader's "signature panel". Any idea how that's done?

@vbuch
Copy link
Owner

vbuch commented Feb 13, 2024

The widget (one that is not [0, 0, 0, 0]) as shown in the linked example will appear in the document active element (hoverable) in my Adobe Reader.
image

Clicking it will open up the Signature Validation Status dialog for this signature.
image

@Chunkygoo
Copy link
Author

which widget exactly? is it the addVisual function you're talking about? https://github.com/vbuch/node-signpdf/blob/develop/packages/examples/src/pdfkit010-with-visual.js#L82

Also, do you mind showing the full dialog of the 'Signature Validation Status' image please just so I can make sure it is indeed what Im looking for?

@vbuch
Copy link
Owner

vbuch commented Feb 14, 2024

No. I'm not talking about addVisual. That just draws something. I used the word "widget" intentionally. I don't think it can be more readable really: https://github.com/vbuch/node-signpdf/blob/develop/packages/examples/src/pdfkit010-with-visual.js#L96

README here then node src/pdfkit010-with-visual.js. Output will be in the output dir. Then you can make sure it is what you are looking for.

@troyam
Copy link

troyam commented Mar 5, 2024

What version of node are you using?

@lutfi-haslab
Copy link

How to add image or annotation with pdf-lib? As far as i know, pdfkit only for creation, cause i dont find load function like in pdf-lib.

@vbuch
Copy link
Owner

vbuch commented Mar 6, 2024

@troyam

% node --version
v21.1.0

@lutfi-haslab pdf-lib allows you to load. It also allows you to add whatever you want to the document. The only thing missing is incremental updates so multiple signatures are not possible with it. If you are asking about pdfkit, I'm sorry but I don't know a way to do it with pdfkit. That is actually why the plain placeholder helper exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants