Closed arpitagrawal0000 closed 4 years ago
Without a PDF that fails, I doubt it that someone would help.
@arpitagrawal0000 you are using a async function. so you have use await before call the method sign( ).
Here goes a pdf that fails, for me. Same error, same case. pdf that [pdf-that-fails.pdf…]()
@dipedro i doubt that your comment is correct, as there is no promise return in none of the methods.
Yup. plainAddPlaceholder is synchronous so that's not the issue.
@zerobytes bad link?
Hi! check if your document is linearized, please visit: https://www.pdftron.com/blog/pdf-format/what-is-pdf-linearization/ The bug that exists is when the split is made, the "trailer" section is not found. Then it fails.
/home/hp/project/node_modules/node-signpdf/dist/helpers/plainAddPlaceholder/readRefTable.js
const [objects, infos] = refTable.toString().split('trailer');
Same error here.. PDF that fails PDF 140mb Error: Cannot read property 'split' of undefined readRefTable.js#L48
@ankology if you edit the document, you can see in the first lines that your document is linearized
%PDF-1.5 %âãÏÓ 1028 0 obj <</Linearized 1/L 142559740/O 1031/E 414421/N 242/T 142558182/H [ 490 812]>> endobj
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.
this issue occurs when you are using PDF-Lib to add or parse the PDF before the signing process.
{ useObjectStreams: false } to the save() method did the trick! in pdf-lib
can anyone help why I am getting this issue? here is my code:-
and i am getting this error.