-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unterminated object when using PdfWriter with incremental=True #3118
Comments
Thanks for the report. Feel free to submit a corresponding PR. |
I am the author of the endesive package (cryptographic signature of pdf files), hence my interest in incremental saving to a pdf file. I do not know how the current trailer with incremental saving compares to the pdf standard and who is making the mistake and to whom I can report my problem. What is your opinion on this subject? |
I have to admit that I have never used incremental saving or really dug into signing PDF files, as there is no real use case from my side. Apart from this: As long as your changes do not (knowingly) break existing workflows and are explained (and possibly backed by the PDF specification) well enough, I do not see an issue with merging a corresponding PR. If this relates to a past change in pypdf, I appreciate pointing to it as well to evaluate why this might have been changed.
At least the PDF 1.7 standard is publicly available and the PDF 2.0 standard can be downloaded for free after providing your personal data. Unfortunately, not all aspects are defined well enough, thus some decisions or implementation details might not match exactly (and maybe cannot match exactly). I would assume that Adobe as the original creator of the standard are doing it as intended originally, but the lack of error debugging there usually makes it hard to identify the actual culprit. |
What is the current state of this issue from your side after you closed #3119? |
I have a problem writing a test for this report, first of all. Secondly, I would have to read the pdf documentation because I have too little knowledge about incremental recording, and this whole procedure does not suit me. |
Environment
Linux-6.1.0-31-amd64-x86_64-with-glibc2.36
pypdf==5.3.0, crypt_provider=('cryptography', '44.0.0'), PIL=11.1.0
Code + PDF
This is a minimal, complete example that shows the issue:
Last object in generated pdf is XRef table but it has no endobj tag:
12 0 obj<<
/Type /XRef
...
/Length 18
stream
....
endstream
endobj <- this element is missing
startxref
1742
%%EOF
The text was updated successfully, but these errors were encountered: