You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run pdfsig <document_path> I get the following error:
Syntax Error (0): Illegal values in ByteRange array
- Signer Certificate Common Name: (null)
- Signer full Distinguished Name: (null)
- Signing Time: Apr 21 2024 19:09:32
- Signing Hash Algorithm: unknown
- Signature Type: adbe.pkcs7.detached
- Signed Ranges: [0 - 25497], [41883 - 43123]
- Not total document signed
- Signature Validation: Signature has not yet been verified.
My code looks like this:
exportasyncfunctionPOST(request: Request){try{const{ pdfBase64 }=awaitrequest.json();constpdfBuffer=Buffer.from(pdfBase64,"base64");// certificate.p12 is the certificate that is going to be used to signconstcertificatePath=join(process.cwd(),"/public/client-identity.p12");constcertificateBuffer=fs.readFileSync(certificatePath);constsigner=newP12Signer(certificateBuffer);constpdfWithPlaceholder=plainAddPlaceholder({
pdfBuffer,reason: "The user is decalaring consent.",contactInfo: "[email protected]",name: "John Doe",location: "Free Text Str., Free World",});// pdfWithPlaceholder is now a modified buffer that is ready to be signed.constsignedPdf=awaitsignpdf.sign(pdfWithPlaceholder,signer);constsignedPdfBase64=signedPdf.toString('base64');console.log(signedPdf);returnNextResponse.json({ signedPdfBase64 },{status: 200});}catch(error){console.error(error);returnNextResponse.json(error,{status: 500});}}
The text was updated successfully, but these errors were encountered:
When I run
pdfsig <document_path>
I get the following error:My code looks like this:
The text was updated successfully, but these errors were encountered: