-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
How to properly signing a signature form field? #104
Comments
After some digging it seems that I don't want to use I think I've identified the code that would need to be modified: const widget = pdf.ref({
Type: 'Annot',
Subtype: 'Widget',
FT: 'Sig',
Rect: [0, 0, 0, 0],
V: signature,
T: new String(signatureName + (fieldIds.length + 1)), // eslint-disable-line no-new-wrappers
F: 4,
P: pdf.page.dictionary, // eslint-disable-line no-underscore-dangle
});
pdf.page.dictionary.data.Annots = [widget];
// Include the widget in a page
let form;
if (!isAcroFormExists) {
// Create a form (with the widget) and link in the _root
form = pdf.ref({
Type: 'AcroForm',
SigFlags: 3,
Fields: [...fieldIds, widget],
});
} else {
// Use existing acroform and extend the fields with newly created widgets
form = pdf.ref({
Type: 'AcroForm',
SigFlags: 3,
Fields: [...fieldIds, widget],
}, acroFormId);
}
pdf._root.data.AcroForm = form; I think adding a Is there anything I'm missing? |
For reference the version of the PDF I'm working on currently is const acroFormPosition = pdfBuffer.lastIndexOf('/Type /AcroForm'); fails to find
It looks like the form field refs are stored here:
Which is referenced here:
The problem is I can't figure out how to connect the two... Any ideas? |
https://github.com/vbuch/node-signpdf#append-a-signature-placeholder
That's how it is in a PDF 1.3. Where is the root descriptor of latter version, i have no clue. |
Ah I see... it’s a mystery isn’t it 😂 Currently I’m trying to convince the client that using JWS will be easier and more efficient and we can generate a PDF from the end product after the fact, but use JWS to store the audit trail and provide non-reputation. Wish me luck! 💀 Sent with GitHawk |
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. |
Hi @NoahCardoza, were you able to add the hover functionality? Can you share how did you do it. |
Sifting through the issues I've found #22 and #39. The latter being a little hard to follow.
I'm trying to sign a PDF with form fields, some of which are meant for signatures. Is there a "special" way to sign the document and overlay an image of the user's written signature/time stamp in which Acrobat will properly identify it?
E.G. Let the user hover over the form and show the details of the signature?
The text was updated successfully, but these errors were encountered: