Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Shrink Images and PDFs

by parv (Vicar)
on May 02, 2020 at 11:08 UTC ( #11116351=note: print w/replies, xml ) Need Help??


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 (Bishop) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11116351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2020-09-27 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (143 votes). Check out past polls.

    Notices?