Open CristiCh opened 3 months ago
This is hard to troubleshoot without an example PDF file, but one thing to know with pdf-lib
is that it has some limitations such as not handling encrypted documents (https://github.com/Hopding/pdf-lib?tab=readme-ov-file#encryption-handling).
Looking at the error message, it seems the placeholder code is having difficulty adding a signature placeholder to a new or existing acroForm at: https://github.com/vbuch/node-signpdf/blob/4a6a2a46a6a786f35d58a3e00c6acd13827445ee/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js#L174
Unfortunately the pdf-lib
dependency hasn't been updated in over 2 years. I've been looking for a solution too, and while this node-signpdf
does a nice job of its purpose of showing how to sign a typical PDF, it isn't a production-ready library for a full range of existing PDFs.
I get the following error when trying to sign a document using @signpdf module. Can anyone please help me regarding this issue?
This is the code I use:
The error is the following:
I tried different libraries for signing a pdf file but none work. The error is "Cannot read properties of undefined (reading 'push')" when using @signpdf module. I need the document to be signed using the placeholder and signer. Thanks!