vbuch / node-signpdf

Simple signing of PDFs in node.
MIT License
719 stars 178 forks source link

Bug on not creating signature even if the last is %%EOF #94

Closed hmpvillegas closed 4 years ago

hmpvillegas commented 4 years ago

Describe the bug and the expected behaviour for having cannot find %%EOF of the PDF, if the pdf has %%EOF

Is it a bug in signing or in the helpers? yes on the removeTrailingNewLine.js

To Reproduce find a pdf that has no new line at the last char of the PDF.

The picture below is the FIX for the removeTrailingNewLine or set a condition on the helper I guess.

kindly code it to the repo or someone has to do it.

Screenshot from 2020-08-09 15-50-26