@vbuch
Describe the bug and the expected behavior
--> Currently, I am using this library to signup a document and then verify it, over in the code I initially create a placeholder via plainPlaceholder and then sign it using the signer, which works for some pdf but throws an error as " SignPdfError: Failed to find the pages descriptor. This is probably a problem in node-signpdf." in some of the complex PDF's
Is it a bug in signing or in the helpers?
If it's an issue with helpers, within the /helpers/plainAddPlaceholder/getPagesDictionaryRef.js:20:11
To Reproduce
To reproduce try signing the file "pdf_scripting.pdf", by adding a planeAddPlaceHolder to it initially and then signing it via the signer, as in the code below --->>>
The Findings
I found that this error might have been at the regex check in the helper file getPagesDictionary, The above file giving error had a info.xref.root as "'\n/S /JavaScript\n/JS (event.value = "www.pdfscripting.com"\r\n\r\n)\n'", while the one which worked properly had a info.xref.root as "'\n/Pages 2 0 R\n/Type /Catalog\n'".
Can you modify the regex to accept the below-attached files, or please provide us with a different solution.
This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.
@vbuch Describe the bug and the expected behavior --> Currently, I am using this library to signup a document and then verify it, over in the code I initially create a placeholder via plainPlaceholder and then sign it using the signer, which works for some pdf but throws an error as " SignPdfError: Failed to find the pages descriptor. This is probably a problem in node-signpdf." in some of the complex PDF's
Is it a bug in signing or in the helpers? If it's an issue with helpers, within the /helpers/plainAddPlaceholder/getPagesDictionaryRef.js:20:11
To Reproduce To reproduce try signing the file "pdf_scripting.pdf", by adding a planeAddPlaceHolder to it initially and then signing it via the signer, as in the code below --->>>
The Findings I found that this error might have been at the regex check in the helper file getPagesDictionary, The above file giving error had a info.xref.root as "'\n/S /JavaScript\n/JS (event.value = "www.pdfscripting.com"\r\n\r\n)\n'", while the one which worked properly had a info.xref.root as "'\n/Pages 2 0 R\n/Type /Catalog\n'".
Can you modify the regex to accept the below-attached files, or please provide us with a different solution.
Error Throwing pdf -> pdf_scripting.pdf Working pdf -> sample.pdf