Re: [R] consider running tools::compactPDF(gs_quality = "ebook")

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [R] consider running tools::compactPDF(gs_quality = "ebook")

Søren Højsgaard-2
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. "

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]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [R] consider running tools::compactPDF(gs_quality = "ebook")

jing hua zhao

Idid this inside R; not ideal but worked.

________________________________
From: R-devel <[hidden email]> on behalf of Søren Højsgaard <[hidden email]>
Sent: 08 July 2018 15:46
To: [hidden email]
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.



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]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [R] consider running tools::compactPDF(gs_quality = "ebook")

jing hua zhao
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 <[hidden email]> on behalf of jing hua zhao <[hidden email]>
Sent: 08 July 2018 16:00
To: Søren Højsgaard; [hidden email]
Subject: Re: [Rd] [R] consider running tools::compactPDF(gs_quality = "ebook")


Idid this inside R; not ideal but worked.

________________________________
From: R-devel <[hidden email]> on behalf of Søren Højsgaard <[hidden email]>
Sent: 08 July 2018 15:46
To: [hidden email]
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]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel