-
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
Missing "Size" info in the trailer #1901
Comments
Your analysis looks correct and I agree that TK.SIZE could be added to the list : the value is mandatory, as as part of the list, it will not be overwritten by old trailers. |
Hello, |
Thank you for your input @talcher 🙏 Yes, this is all we need for the moment :-) |
Hi,
I use WeasyPrint to create PDF.
I recently upgraded my libraries to WeasyPrint 59.0 and pypdf 3.10.0.
My aim is to get the trailer of a PDF I created with WeasyPrint. In this trailer, I need the "Size" field, among others.
Previously, I got something like:
Now, I get something like:
If I force WeasyPrint to create a 1.4-versioned PDF, I get the trailer I expect.
However, this is not what I want. It would be much better not to force the 1.4 version.
Environment
Code + PDF
Here are two PDF samples:
Suggestion
I have had a look at pypdf source code.
Correct me if I am wrong, but I think my issue is related to the "_read_xref_tables_and_trailers" function of the reader class, where trailer keys are defined that way: "trailer_keys = TK.ROOT, TK.ENCRYPT, TK.INFO, TK.ID"
If you need some more information, I would be glad to provide them.
Thank you for your help.
Alcher
The text was updated successfully, but these errors were encountered: