From jinghu@zh@o @ending from hotm@il@com  Sun Jul  8 18:05:07 2018
From: jinghu@zh@o @ending from hotm@il@com (jing hua zhao)
Date: Sun, 8 Jul 2018 16:05:07 +0000
Subject: [Rd] 
 [R] consider running tools::compactPDF(gs_quality = "ebook")
In-Reply-To: <DB6P189MB0581E6669D34563F2AAC1AD0A5450@DB6P189MB0581.EURP189.PROD.OUTLOOK.COM>
References: <7E8037094A0C2146AA3E6F94DAE621C3012A64C771@AD-EXCHMBX3-3.aau.dk>, 
 <CAGxFJbRBPGmt9NLdZs-k_9_X-r92Evrh1jE5+5UG=-Q+oA3ziQ@mail.gmail.com>, 
 <7E8037094A0C2146AA3E6F94DAE621C3012A64CBF5@AD-EXCHMBX3-3.aau.dk>,
 <DB6P189MB0581E6669D34563F2AAC1AD0A5450@DB6P189MB0581.EURP189.PROD.OUTLOOK.COM>
Message-ID: <DB6P189MB05813F4D80AE35B33FAAE5C6A5450@DB6P189MB0581.EURP189.PROD.OUTLOOK.COM>

A bit clarification -- tools::compactPDF() worked on the PDF at the current directory for me -- not sure about building PDF on the fly.

________________________________
From: R-devel <r-devel-bounces at r-project.org> on behalf of jing hua zhao <jinghuazhao at hotmail.com>
Sent: 08 July 2018 16:00
To: S?ren H?jsgaard; r-devel at r-project.org
Subject: Re: [Rd] [R] consider running tools::compactPDF(gs_quality = "ebook")


?did this inside R; not ideal but worked.

________________________________
From: R-devel <r-devel-bounces at r-project.org> on behalf of S?ren H?jsgaard <sorenh at math.aau.dk>
Sent: 08 July 2018 15:46
To: r-devel at r-project.org
Subject: Re: [Rd] [R] consider running tools::compactPDF(gs_quality = "ebook")

Dear all,

I run

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

and/or

R CMD build --compact-vignettes="gs+qpdf"  gRbase

and in the log from r-devel (on winbuilder) I get

* checking sizes of PDF files under 'inst/doc' ... WARNING
  'gs+qpdf' made some significant size reductions:
     compacted 'gRbase-arrays.pdf' from 421Kb to 115Kb
  consider running tools::compactPDF(gs_quality = "ebook") on these files

According to "writing R extensions" things should be fine (I have gs and qpdf on my system):

"The --compact-vignettes option will run tools::compactPDF over the PDF files in inst/doc (and its subdirectories) to losslessly compress them. This is not enabled by default (it can be selected by environment variable _R_BUILD_COMPACT_VIGNETTES_) and needs qpdf (http://qpdf.sourceforge.net/) to be available. "
QPDF: A Content-Preserving PDF Transformation System<http://qpdf.sourceforge.net/>
qpdf.sourceforge.net
What is QPDF? QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf.


QPDF: A Content-Preserving PDF Transformation System<http://qpdf.sourceforge.net/>
qpdf.sourceforge.net
What is QPDF? QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf.



Can anyone please tell me what to do?

Best regards
S?ren

---

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.

6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Rcpp_0.12.17    shtools_1.0     markdown_0.8    knitr_1.20
[5] rmarkdown_1.10  devtools_1.13.5

loaded via a namespace (and not attached):
 [1] lattice_0.20-35         digest_0.6.15           withr_2.1.2
 [4] rprojroot_1.3-2         grid_3.4.4              backports_1.1.2
 [7] magrittr_1.5            evaluate_0.10.1         stringi_1.2.3
[10] curl_3.2                RcppArmadillo_0.8.500.0 Matrix_1.2-14
[13] tools_3.4.4             RcppEigen_0.3.3.4.0     stringr_1.3.1
[16] compiler_3.4.4          memoise_1.1.0           htmltools_0.3.6




        [[alternative HTML version deleted]]


        [[alternative HTML version deleted]]

______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

	[[alternative HTML version deleted]]



[Rd] [R] consider running tools::compactPDF(gs_quality = "ebook")
jing hua zhao