Merging multiple PDFs appears to duplicate resources per page #239
Labels
is-bug
From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
needs-pdf
The issue needs a PDF file to show the problem
nf-performance
Non-functional change: Performance
I'm using PyPDF2 to merge thousands of individual PDFs (generated by WeasyPrint) into a single PDF. The resulting PDF looks fine with all of the pages merged, but the resulting file is quite large. I believe this is due to fonts/images being unnecessarily duplicated per-page.
For
/Font
and at least one of the/XObject
images, I believe theIndirectObject
s should all point to the same object ID as they are identical in the initial separate PDFs.The text was updated successfully, but these errors were encountered: