vbuch / node-signpdf

Simple signing of PDFs in node.
MIT License
688 stars 175 forks source link

After the signature is completed, the pdf data containing the signature page is lost #158

Closed xakxak007 closed 2 years ago

xakxak007 commented 2 years ago

After signing with this test pdf, the black frame and part of the text on the first page will be lost.

"test.pdf" is before signature, "ok.pdf" is after signature👇

test.pdf ok.pdf

vbuch commented 2 years ago

Thank you for the example PDF. It would've been nice if you also told us what you were doing to this file, but ... yeah... it was guessable that you were doing plainAddPlaceholder + sign. I've been playing around a bit with this and I seem to have found the root cause of it somewhere in readRefTable. I've already written a bit of code that simplifies the logic there. Need some more time to wrap this up.

vbuch commented 2 years ago

image

Nice! I seem to have found and fixed it. Need to make sure it's all tested and there are no regressions, but it's promissing indeed.

vbuch commented 2 years ago

Fixed in 1.5.0