Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid PDF is formed for some PDFs #5

Open
nradosevic opened this issue Aug 17, 2019 · 1 comment
Open

Invalid PDF is formed for some PDFs #5

nradosevic opened this issue Aug 17, 2019 · 1 comment

Comments

@nradosevic
Copy link

nradosevic commented Aug 17, 2019

For some PDFs, the resulting signed PDF is corrupted. I can't remember exactly how I got this PDF, but I think I used some PDF to word conversion service like https://www.pdftoword.com/en/. Probably PDF that is formed by the PDF to word converter has something strange and non-standard in it's structure, and then when the document is prepared for signing something goes wrong. On the other hand, when I try to sign this PDF using some other library like for ex. Apache PDFBox for Java, it's working fine, so that means that this library could be readjusted to make it work with PDFs like this one.

Here's a PDF that I'm talking about: http://www.filedropper.com/contract

@nradosevic
Copy link
Author

After debugging I found out that the PDF gets corrupted after appending the acro form. So, it gets corrupted after this line 405 - var array = insertIntoArray(pdf.stream.bytes, offsetForm, appendAcroForm);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant