[R] Shrink file size of pdf graphics

Layman123 romanhornung at web.de
Thu May 19 22:35:51 CEST 2011


Thank you all for the quick answers!

I googled first instead of having the idea to search this forum...
I'm using R 2.12.2 on a 32-bit Computer with windows installed.

Up to this point I was trying to get the image the way I would like to have
it, but didn't get fully satisfactory results.
I tried both, the plot devices in R and pdftk. First I tried the png-device,
but as I wanted to increase the number of pixels with 'width' and 'height',
the labels are getting smaller. Yet attempting to prohibit this manually
with 'cex' doesn't give satifactory results. Searching the list I read about
the package 'cairoDevice' that would prevent this, increasing only the
resolution of the image and changing nothing about the size of the objects
in the plot. After I managed to install it, I got an error trying to open a
'Cairo'-device. I probably missed to install something. The CRAN-page
doesn't state anything on how to do this. Is there a way in R to produce
images with high resolution?

Using pdftk I managed to compress the file size from 13 MB to 3,6 MB. This
is really a good compression. However I would need an even smaller file
size. Unfortunately I saw your post very late, Aaron. With this command, a
pdf of size 3,4 MB was produced. pdftk doesn't seem to offer any options to
take influence on how much the pdf is compressed. 
Is there a way to do this with the gs-command so that it would be even more
compressed?

--
View this message in context: http://r.789695.n4.nabble.com/Shrink-file-size-of-pdf-graphics-tp3536042p3536850.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list