I have switched to the latest branch to fix that bug with the word trailer.
My code now doesn't working, complaining about Signer implementation expected. Have i missed something?
// certificate.p12 is the certificate that is going to be used to sign
var certificateBuffer = fs.readFileSync('./resources/certificate.p12');
var signer = new P12Signer(certificateBuffer);
// The PDF needs to have a placeholder for a signature to be signed.
pdfBuffer = plainAddPlaceholder({
pdfBuffer: pdfBuffer,
reason: 'The user is declaring consent through JavaScript.',
contactInfo: 'signpdf@example.com',
name: 'John Doe',
location: 'Free Text Str., Free World',
});
// pdfWithPlaceholder is now a modified buffer that is ready to be signed.
pdfBuffer = await signpdf
.sign(pdfBuffer, signer)
I have switched to the latest branch to fix that bug with the word trailer.
My code now doesn't working, complaining about Signer implementation expected. Have i missed something?