Skip to content

[R-pkg-devel] cannot reduce vignette size in package

3 messages · Grose, Daniel, Uwe Ligges, Ben Bolker

#
Hi

I have just added a vignette to an R package that is already on CRAN. However, when I submit the new version I get

* checking sizes of PDF files under 'inst/doc' ... WARNING

  'gs+qpdf' made some significant size reductions:
     compacted 'article.pdf' from 794Kb to 530Kb

I have tried building the package using

R CMD build --compact-vignettes="gs+pdf"

but the size of the vignette pdf does not get reduced

I have also tried


R CMD build --compact-vignettes="pdf"

R CMD build --compact-vignettes="gs"

R CMD build --compact-vignettes="both"

and

devtools::build(args = c('--compact-vignettes=gs+qpdf'))

devtools::build(args = c('--compact-vignettes=qpdf'))

devtools::build(args = c('--compact-vignettes=gs'))

devtools::build(args = c('--compact-vignettes=both'))

In all cases these options have no effect on the size of the pdf.

I do have both gs and qpdf available on the system.

$ which gs

/usr/bin/gs

$ which qpdf

/usr/bin/qpdf

Any help / guidance would be much appreciated.

Many thanks,

Dan
#
Perhaps your versions of qpdf and/or  gs are outdated or unavailable?

Best,
Uwe Ligges
On 23.08.2022 14:06, Grose, Daniel wrote:
#
Have you tried R CMD build --compact-vignettes=both ? (I get confused
every time about whether the arguments are supposed to be quoted or
not; I don't remember, although the next line in the help
'--compact-vignettes   same as --compact-vignettes=qpdf' makes me
think they're *not* supposed to be quoted ...)

On Tue, Aug 23, 2022 at 9:24 AM Uwe Ligges
<ligges at statistik.tu-dortmund.de> wrote: