Optimising your pdf file – latex dvips ps2pdf

For those wanting to distribute latex documents in pdf file format, it is possible to leave all optimisation of the file to the last step.

latex command generates dvi file.

dvips command generates ps file

ps2pdf command generates pdf file.

ps2pdf has a lot of possible options for file optimisation. The option -dPDFSETTINGS=
provides several sets of defaults to generate output similar to the acrobat distiller program in windows and mac (of course in linux you also have flexibility to specify every other option too if you wanted).

For example;

ps2pdf file.ps file.pdf generates big file

ps2pdf -dPDFSETTINGS=/screen file.ps file_screenoptimised.pdf generates small file suitable for reading on computer screen only

ps2pdf -dPDFSETTINGS=/ebook file.ps file_ebookoptimised.pdf generates slightly larger file with higher resolution graphics suitable for ebook readers

Advertisement

2 Responses

  1. according to wikibooks it is also possible to use ghostscript to make a compressed pdf http://en.wikibooks.org/wiki/LaTeX/Absolute_Beginners

    gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=”Compressed.pdf” “Original.pdf”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.