View Single Post
  #11  
Old November 14th 19, 07:13 PM posted to microsoft.public.windowsxp.general,alt.comp.freeware,alt.comp.os.windows-10,alt.windows7.general,comp.text.pdf
Arlen Holder[_5_]
external usenet poster
 
Posts: 6
Default Please improve this listing of available freeware PDF functionality

On Mon, 14 Oct 2019 17:45:44 -0400, Paul wrote:

mutool info sample.pdf


Hi Paul,
We forgot to list free pdf optimization, aka shrinking the file size,
compression, making the file smaller, downsampling, whatever.

I generally use Acrobat payware to shrink, and, when the going gets rough,
I use ImageMagick (usually on Linux) or GhostScript, but your mutool
suggestion might be useful for free PDF shrinking.

Here are my logs if anyone has the need for a free PDF shrinker.
a. Test files
b. Log files

TEST FILES:
o Designing Analog Chips, by Hans Camenzind
http://designinganalogchips.com/_count/designinganalogchips.pdf
o Introduction to Programming using Python, by Y Daniel Liang
https://doc.lagout.org/programmation/python/Introduction%20to%20Programming%20using%20Python%2 0%5BLiang%202012-01-12%5D.pdf
o Building Blocks for Theoretical Computer Science, by Margaret M. Fleck
http://mfleck.cs.illinois.edu/building-blocks/version-1.3/whole-book.pdf
o Free to Choose, by Milton Friedman
http://www.proglocode.unam.mx/sites/proglocode.unam.mx/files/docencia/Milton%20y%20Rose%20Friedman%20-%20Free%20to%20Choose.pdf
o Designing automotive suspension systems
https://tinyurl.com/advanced-vehicle-technology

LOG FILES:
Usually when Adobe Acrobat fails to get a good size, ImageMagick wins:
o convert -density 200x200 -quality 60 -compress jpeg big.pdf small.pdf
o convert -density 200x200 -quality 60 -compress jpeg -resize 50% big.pdf
small.pdf
o convert -compress Zip -density 150x150 big.pdf small.pdf
o http://www.imagemagick.org/script/command-line-options.php#compress

If not, GhostScript works reasonably well on a lot of the PDFs.
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen
-dNOPAUSE -dBATCH -dQUIET -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/printer
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4
-dDownsampleColorImages=true -dColorImageResolution=150 -dNOPAUSE -dBATCH
-sOutputFile=small.pdf big.pdf
#!/bin/sh
gs -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=72 \
-dGrayImageDownsampleType=/Bicubic \
-dGrayImageResolution=72 \
-dMonoImageDownsampleType=/Bicubic \
-dMonoImageResolution=72 \
-sOutputFile=out.pdf \
$1

But each PDF is different.

There are LOTs of solutions in my logs that I've done over the years.
o https://github.com/pts/pdfsizeopt
o pdfsizeopt big.pdf small.pdf
o pdftk big.pdf output small.pdf compress
o https://mupdf.com/docs/manual-mutool-convert.html
o https://mupdf.com/docs/manual-mutool-create.html
o http://qpdf.sourceforge.net/
o qpdf --linearize big.pdf small.pdf
o pdf2ps big.pdf huge.ps && ps2pdf huge.ps small.pdf
o ps2pdf -dPDFSETTINGS=/ebook big.pdf small.pdf
o ps2pdf -dPDFSETTINGS=/printer big.pdf small.pdf
o pdf2ps big.pdf huge.ps && ps2pdf -dPDFSETTINGS=/screen
-dDownsampleColorImages=true -dColorImageResolution=200
-dColorImageDownsampleType=/Bicubic huge.ps small.pdf
o ps2pdf -dDownsampleColorImages=true -dDownsampleMonoImages=true
-dDownsampleGrayImages=true -dColorImageResolution=300
-dGrayImageResolution=600 -dMonoImageResolution=1200
o https://www.windows10download.com/4dots-free-pdf-compress/ - stinks
o https://github.com/gugli28/PdfCompressor
o http://www.nicepdf.com/products.html shareware
o https://www.timedicer.co.uk/programs/help/pdf-compress.sh.php
o Open big.pdf in Libre Office; export as pdf; set "jpeg compression
quality" & "image resolution"
o etc.

In short, do you have a good free solution for resizing PDFs?
Ads