vbuch / node-signpdf

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

🐛 Fixing AcroForm ID extraction #92

Closed brunoserrano closed 4 years ago

brunoserrano commented 4 years ago

Currently pdfkitAddPlaceholder tries to get the AcroForm ID by extracting it from AcroForm object, but it fails when the ID has 3 digits (or eventually more), it is currently prepared for a 2 digit ID.

I modified the code to count the digits before getting the AcroForm object.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 321


Totals Coverage Status
Change from base Build 319: 0.0%
Covered Lines: 295
Relevant Lines: 295

💛 - Coveralls
vbuch commented 4 years ago

Can you add a test for both cases? Matching small and big ids. Just so we're sure we don't regress thatbin the future. You can do it with a whole PDF or just isolating that part.

brunoserrano commented 4 years ago

Done @vbuch! Thank you for suggesting that.

vbuch commented 4 years ago

Released in 1.3.0