Skip to content
Back to formatted view

Raw Message

Message-ID: <62D1F69F-D662-414D-9676-04322A69C5F8@outlook.com>
Date: 2018-01-10T23:40:53Z
From: Marius PASCARIU
Subject: [R-pkg-devel] Resize PDF Vignettes in Source Package
In-Reply-To: <92dcf0df-3dac-d0a8-c91d-6cd3701756a1@gmail.com>

--compact-vignettes alone did not work.
--compact-vignettes=gs+qpdf did the job.

Thanks.
Marius Pascariu

On 11 Jan 2018, at 00:56, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

On 10/01/2018 2:08 AM, Marius PASCARIU wrote:
Dear all,
I want to add PDF vignettes to my package created with rmarkdown. The PDFs are generated without problems. If I submit the package to CRAN I would a warning telling me that the files are too large (see below):
checking sizes of PDF files under 'inst/doc' ... WARNING
 'gs+qpdf' made some significant size reductions:
    compacted 'Manual.pdf' from 370Kb to 116Kb
 consider running tools::compactPDF(gs_quality = "ebook") on these files
I do run `tools::compactPDF(gs_quality = "ebook?)` and the size of the PDF is indeed reduced to 116Kb. Now, if I build again the source package using `R CMD build <package_name>` the vignette is reconstructed at its original size (370Kb). However, If I build the package using `R CMD build <package_name> --no-build-vignettes` in order to keep the small PDF, the check would throw me the following NOTE:
Package has a VignetteBuilder field but no prebuilt vignette index.
Any ideas how can I include the compacted PDFs in the souce package and have a vignette index in the same time?


When you build the tarball, use the --compact-vignettes option.

Duncan Murdoch


	[[alternative HTML version deleted]]