All images are included in split up documents #314
Replies: 1 comment
-
The creators of that PDF document took a simple approach: There is only a single resource catalog that lists all images - and that catalog is used for all pages. PDFsharp does not analyze the contents of the page, PDFsharp includes all images listed in the required resources of the page. Normally, PDF pages should only list the resources they actually use. In that case, PDFsharp will only include the images needed by the imported pages. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we face a problem when splitting up a PDF into several "smaller" PDF files.
We basically use the code below to split the PDF by using page ranges provided:
This creates several documents only containing the pages of the page ranges. However some of the documents are basically as large as the original document.
I am not into the PDF specs, but in debugger I could see that some of the pages seems to have references to all images contained in the original document, even if only some of them are visible, e.g. in a PDF reader. It seems that all images are then included in the output split document, even if they are not required for the pages.
When splitting up the file by other tools, these drop all the references not really used on the split pages.
The document Sample Catalog.pdf has this behavior.
Is this intentional behavior?
Is there any way such that only required images are included in the output documents?
Thanks you!
Beta Was this translation helpful? Give feedback.
All reactions