For some PDFs plainAddPlaceholder returns error, although it works for w3dummy.pdf
See original GitHub issuefunction signExistingPDF(pdfFile: string) {
let pdfBuffer = readFileSync(pdfFile);
pdfBuffer = plainAddPlaceholder({
pdfBuffer,
reason: 'I have reviewed it.',
// signatureLength: 1612,
});
return pdfBuffer;
}
Stack trace
TypeError: Cannot read property 'split' of undefined
at getXref (/.../node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/readRefTable.js:55:34)
at getFullXrefTable (/.../node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/readRefTable.js:79:25)
at readRefTable (/.../node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/readRefTable.js:100:25)
at readPdf (/.../node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/readPdf.js:31:46)
at plainAddPlaceholder (/.../node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/index.js:54:37)
at signExistingPDF (/.../pdfsig/index.ts:66:15)
........
Although it works for w3dummy.pdf
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
plainAddPlaceholder creating invisible signature #39 - GitHub
I used plainAddPlaceholder function to create the placeholder and then added the signature. The output PDF have the signature properly, but Acrobat Reader...
Read more >Troubleshoot viewing PDF files on the web - Adobe Support
Follow these steps to solve the common issues around viewing PDF files from a website.
Read more >PDF documents not printing from web browsers
PDF documents not printing from web browsers. Most PDF documents are designed to work using Adobe Acrobat Reader as the reader software. But...
Read more >How to Work With a PDF in Python
In this step-by-step tutorial, you'll learn how to work with a PDF in Python. You'll see how to extract metadata from preexisting PDFs...
Read more >Help with PDF Documents - Maine.gov
Some documents on Maine.gov are provided in PDF format. ... You received an error message containing "% PDF" or you have received a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @vbuch, looks like the issue has been resolved with the latest changes. Thanks for fixing it.
I think this issue can be marked as fixed until @vologab @lucasmassi has some other points.
@vologab @sumanmaity1234 @lucasmassi #57 is now in 1.2.2. Could you check if your issues are still reproducible or this one can be closed?