[OS X TeX] Compressing pdf graphics
M A
markoilcan at gmail.com
Thu May 24 16:14:03 CEST 2007
On 5/23/07, Chabot Denis <chabotd at globetrotter.net> wrote:
> Hi again,
>
> Here is a summary of what I have learned about the options to
> compress/convert individual pdf graphics before I include them in a
> LaTeX document.
>
> I started by producing a rather large graphic file with R. I saved it
> as a pdf and as a postscript file:
>
> -rw-r--r-- 1 chabotd chabotd 3384788 May 23 20:54
> fig_pdf_from_R.pdf
> -rw-r--r-- 1 chabotd chabotd 1426330 May 23 20:54 fig_ps_from_R.ps
>
> Then I did the following, with file sizes shown in the same order below:
>
> - convert the ps file to pdf using Preview, epstopdf, or ps2pdf, or
> pstopdf. All but the last one gave similar sizes.
>
> -rw-r--r-- 1 chabotd wheel 3749887 May 24 00:14
> fig_ps_Preview.pdf
> -rw-r--r-- 1 chabotd chabotd 3354762 May 23 23:55
> fig_ps_epstopdf.pdf
> -rw-r--r-- 1 chabotd chabotd 3356223 May 23 21:12 fig_ps_ps2pdf.pdf
> -rw-r--r-- 1 chabotd chabotd 11397461 May 23 23:51
> fig_ps_pstopdf.pdf
>
> - I also tried to shring the pdf file produced by R. In order: print-
> to-compress-pdf from Skim (or any other app) and pdftk. The latter
> was the winner overall. Text remained searchable in all methods.
>
> -rw-r--r-- 1 chabotd chabotd 379307 May 23 22:31
> fig_pdf_comptk.pdf
> -rw-r--r-- 1 chabotd chabotd 520506 May 23 21:16
> fig_pdf_print_to_comppdf.pdf
>
Out of curiosity, what method did you use to create the pdf files in
R? I believe functions like dev.print(pdf, "file.pdf") use R's
internal routines to create the pdf. If you are using R.app, though,
you can also use the quartz.save("file.pdf", type="pdf"), which, I
believe, uses Apple's pdf rendering methods. It could be that one will
give you smaller pdf files.
Mark A
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list