Compress a PDF file for the web

compress-newsletter compresses PDF files (typically those produced by Desktop Publishing Programs like Scribus) to make their file size more web compatible.

The way to achieve this is to first convert the PDF file to PostScript and the re-distill to PDF with size-optimizing options (like font subsetting and image downsampling) enabled.

A somewhat older (but functional) version of this script, together with some discussion, can be found at http://wiki.scribus.net/index.php/Web_optimised_PDF.


Download compress-newsletter.

Documentation:
# Name:   compress-newsletter
# Author: wd (Wolfgang [.] Dobler []t ucalgary.ca)
# Date:   03-Oct-2005
# Description:
#   Use ghostscript's pdfwrite device (à la ps2pdf) to reduce the
#   Newsletter's PDF file size, and add meta information like author,
#   date, etc.
#   The preferred route is currently:
#                 [scribus>=1.2.3]
#                        |
#                    file.pdf
#                        |
#                 [pdftops>=3.00]
#                        |
#                     file.ps
#                        |
#            [pstopdf14 (gs-gnu-8.16 or higher)]
#                        |
#                        V
#                    final.pdf
# Usage:
#   compress-newletter [-i col:gray:mono] Newsletter_big.pdf
# Options:
#   -i col:gray:mono
#   --imgres=col:gray:mono   Set resolution for downsampling color,
#                            grayscale and black-and-white images
#                            (default is 144:300:300)
#   -d
#   --dont-touch-images      Try to not resample images
#
#   -q
#   --quiet                  Be less verbose
#
#   --debug                  Be more verbose and keep temporary files around

Last modified: Fri May 25 19:10:23 MDT 2007