Someone has asked this question before, but for SVG files. This is the scenario: I have a source file in a DTP program (Scribus in my case). It contains a lot of large images, but only small bits of them are actually visible, most of the image is cropped by the image frame. When exporting to PDF, the resolution can be set for those embedded pixel graphics, but the file size stays enormous just because of the amount of pixels off-screen. As an undesired side-effect, the original full images can be extracted from the PDF. This could be potentially malicious, say, I crop out parts of the image for a reason, maybe they contain personal data, etc.
I don't want to preprocess the images before making the layout because I want the workflow to stay entirely non-destructive.
What I am looking for is a tool, which is able to convert the PDF in a way so that the output stays identical to the original, but the embedded images are cropped and only the visible part of the image is included in the PDF. That's not so trivial in fact for images which have a rotation or not a rectangular frame. Also the images would need to be re-compressed, so the quality will suffer slightly, but still better than reducing the overall resolution or using a stronger compression to save file size.
Here is a discussion from 2010 to add this feature to the PDF export in Scribus: https://scribus.scribus.narkive.com/9MO4dPPP/image-cropping#post4
I have tried:
- exporting to PDF 1.3, but the output file is not getting smaller and the images are still embedded in the same way.
- ghostscript commands to make PDF files smaller, but none of them touches the dimensions of embedded images.
- Master PDF Editor has a "optimized" PDF saving function, but it seems that's just the ghostscript command.
In Adobe InDesign there is an output option for the PDF export (Thanks @billy-kerr) which offers this functionality, but my OS is Linux and the DTP software Scribus.