Forum Bugs

Bloated file when splitting a PDF

I'm using a third party tool to split a very large Prince generated PDF (160MB,600+ pages).

When I split the PDF into 1/20 chunks, the resulting chunks remain 160MB each.

I initially assumed it was a problem with the tool performing the split, but the developer informed me that on analysis of the PDF it appears that each page has references to all fonts and all images used even if they don't appear on the page.

I was told that it might be possible to decode each page and determine if a reference is valid and strip unused images, but it seems that Prince shouldn't be doing this in the first place.

Is it possible that our style sheet is causing Prince to do this?
No, that's entirely our fault I'm afraid. Prince is currently sharing the same resources dictionary across every page. I can see how that would cause problems for applications trying to split the PDFs: it would appear that every page uses every font and every image. We will fix this issue for the next release of Prince, thanks for pointing it out! :)
We've fixed this issue in Prince 7.0, beta available now! :D