http://qs321.pair.com?node_id=11116351


in reply to Shrink Images and PDFs

I see that an image is resized to maximum of 1000 px square (input images are supposedly of larger size). For your PDF files, what does gs do or not do which reduce the PDF file size? Is it mainly ebook option?

Replies are listed 'Best First'.
Re^2: Shrink Images and PDFs
by haukex (Archbishop) on May 02, 2020 at 11:52 UTC
    For your PDF files, what does gs do or not do which reduce the PDF file size? Is it mainly ebook option?

    Yes, I've found the ebook option a convenient way to downsample the resolution of the images embedded in a PDF to 150 DPI. So this script will have a significant effect on PDF files that are large due to them containing high-resolution images (like scans), and less of an effect on PDFs that are already smaller than ~1MB.

      Ah, ok. Thanks for the explanation, mainly because I had not thought of embedded images. I was thinking that ebook option might be restructuring the PDF, using common fonts and removing embedded fonts, etc.

        I was thinking that ebook option might be restructuring the PDF, using common fonts and removing embedded fonts, etc.

        One of the settings of the ebook profile is EmbedAllFonts=true, so I might consider disabling that, but other than that I haven't noticed the gs command modifying anything about the PDFs other than the images.