[Tex/LaTex] Which one produces a pdf with the smaller file size? pdflatex or latex-dvips-ps2pdf

dvipspdftexps2pdf

Assume I have a screenshot in png format and make a copy of it in eps format by using ImageMagick.

I create two input file, namely ForPNG.tex and ForEPS.tex. ForPNG.tex imports the png image and is compiled by pdflatex. ForEPS.tex imports the eps image and is compiled by latex-dvips-ps2pdf.

The question is, which one produces the smaller pdf file in size?

In my experience, ForEPS.pdf will be smaller than ForPNG.pdf. But I am not sure whether it is a summary.

Best Answer

Despite my comment to the original question, I have now come to the conclusion that the latex-dvips-ps2pdf route produces smaller PDF files than pdflatex alone.

However, in my answer to How to make the PDFS produced by pdflatex smaller I suggested to use gs to compress the resulting PDF, which gets you a significant reduction in size. As ps2pdf is as well built on gs internally, one can also directly pass compression options to ps2pdf, so in the end it should not matter.

I made some quick experiments with a beamer presentation. In these experiments the pdflatex-gs route lead to only 1 percent smaller PDFs than latex-dvips-ps2pdf.

So the bottom line is: With respect to the goal of small PDF files, it doesn't matter.

You can just choose your frontend depending on other constraints (e.g., latex-dvips-ps2pdf if you use pstricks or pdflatex-gs to support transparencies in pgf/tikz images).

Related Question