I am using RStudio for package development in windows environment. I need to enable pdf vignette compression to avoid 'gs+qpdf' made some significant size reductions:
warning.
I have added --compact-vignettes="gs+qpdf"
as additional options to Project Options : Build Tools > Build Source Package, but there is no change in the size of pdf vignette in the source package built using devtools::build()
.
I have also added to the YAML header in the vignette latex compression options as follows.
header-includes:
- \pdfminorversion=5
- \pdfcompresslevel=9
- \pdfobjcompresslevel=2
Still there is no change.
However I am getting the desired compression while using tools::compactPDF
with gs_cmd = Sys.getenv("R_GSCMD")
and gs_quality = "ebook
arguments.
How to get the desired compression while building packages for avoiding the warning?