When I sign the PDF with an external signature I get the following error when reading it with Acrobat: "There are errors in the formatting or information contained in this signature."
Here is the code I used:
var dt = new Date().getTime();
var filename = __dirname + "\\output_pdf\\" + "fatura" + dt + ".pdf";
var dt2 = new Date().toISOString();
const outputPath = await addSignaturePlaceholderToPdf({
file: pdfFile,
out: filename,
estimatedsize: 30000,
certlevel: CertificationLevels.NotCertified,
reason: 'I want to sign the document',
location: 'Porto',
contact: 'JOÃO SILVA',
date: dt2,
});
var dt3 = new Date().getTime();
var filename2 = __dirname + "\\output_pdf\\" + "fatura" + dt + "b.pdf";
const outputPath2 = await signPdf({
file: filename,
out: filename2,
signature: signature,
});
When I sign the PDF with an external signature I get the following error when reading it with Acrobat: "There are errors in the formatting or information contained in this signature."
Here is the code I used: