[R] PDF Compression

Paul Hiemstra p.hiemstra at geo.uu.nl
Thu Jul 30 11:35:14 CEST 2009


Hi,

You could have a look at exporting the pdfs using the Cairo package.

cheers,
Paul

David Keegan schreef:
> Hi,
>
> I am generating a large number of graphs with pdf() and
> incorporating them in pdf document using pdflatex.
>
> According to the pdf() help:
>
>    'pdf' writes uncompressed PDF.  It is primarily intended for
>    producing PDF graphics for inclusion in other documents, and
>    PDF-includers such as 'pdftex' are usually able to handle
>    .compression.
>
> But pdflatex incorporates the R graphs without compressing them.
> They appear in the final document in cleartext, almost but not identical
> to what was generated by R.
>
> I tried the latex settings "\\pdfcompresslevel=9",
> "\\pdfobjcompresslevel=3". They reduced the overall size of
> the final document slightly, but didn't cause the embedded R
> graphs to be compressed.
>
> Can anyone suggest how I can get pdflatex to compress the R
> graphs while embedding them? My output files are very big,
> and I know they would be substantially smaller if the R
> graphs were compressed.
>
> Regards,
> David
>




More information about the R-help mailing list