OK, I see. Thanks! Both qpdf or pdftk can be used to compress PDF files. It is still unclear to me which one is better.
Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, May 30, 2011 at 1:30 AM, Graham Smith <myotis...@gmail.com> wrote: > Yihui > >> , I think Graham's question has pointed out a very useful >> direction -- we may consider leaving some sort of API's or hooks in >> the R script in LyX which is used to process the Rnw document. >> >> A few months ago I also recommended the qpdf program to R developers >> to compress PDF plots and it has been included in R now (the option >> --compact-vignettes in R CMD build). Graham, is your script portable >> to Windows and Mac? Could you share it with us? Maybe we can propose >> this feature to LyX developers. It will be definitely helpful. > > Although I do normally use SWeave, these particular files were simply > exported from R, and then imported into Lyx, there just big PDFs. ECDFs > based on 120,000 data points, which is why I suspect they are large without > some form of flattening. > But compressing imported PDFs goes beyond R and maybe qpdf could become a > Lyx feature to optimise PDFs the same way that MSWord allows you to > optimise graphics before saving/printing. > The Nautilus script in Linux uses Ghostscript and maybe this could be > another option to consider along with qpdf. > http://www.webupd8.org/2010/11/download-compress-pdf-12-nautilus.html > But I will have a look at qpdf, thanks, > Graham >