Using --compact-vignettes in build options does not appear to work

I understood that the --compact-vignettes option in the Build Tools/Build Source Package -- R CMD check additional options would run tools::compactPDF over the PDF files in inst/doc (and its subdirectories) to losslessly compress them ( However, the warning I am getting says:

  • checking sizes of PDF files under ‘inst/doc’ ... WARNING
    ‘gs+qpdf’ made some significant size reductions:
    compacted ‘shiny_app_use.pdf’ from 3054Kb to 711Kb
    consider running tools::compactPDF(gs_quality = "ebook") on these files

I need some guidance and would appreciate an explanation of what is happening.

1 Like

How are you building and checking your package? Could you share the exact commands you are running? In other words, what options are you passing to R CMD build (or devtools::build()) and R CMD check (or devtools::check())?

According to this SO answer, you may need to specify --compact-vignettes=both if you are using RStudio to build/check the package.