| pdftk {animation} | R Documentation |
If the toolkit Pdftk is available in the system, it will be called to manipulate the PDF files (especially to compress the PDF files).
pdftk(input, operation = NULL, output, other.opts = "compress dont_ask")
input |
the path of the input PDF file(s) |
operation |
the operation to be done on the input
(default to be |
output |
the path of the output (if missing and
|
other.opts |
other options (default to be
|
This is a wrapper to call pdftk. The path of
pdftk should be set via
ani.options(pdftk = 'path/to/pdftk').
See the reference for detailed usage of pdftk.
if ani.options('pdftk') is non-NULL, then
this function returns the status of the operation
(0 for success; see system);
otherwise a warning will be issued
Yihui Xie <http://yihui.name>
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
pdf("huge-plot.pdf")
plot(rnorm(50000))
dev.off()
## Windows
ani.options(pdftk = "D:/Installer/pdftk.exe")
pdftk("huge-plot.pdf", output = "huge-plot0.pdf")
## Linux (does not work??)
ani.options(pdftk = "pdftk")
pdftk("huge-plot.pdf", output = "huge-plot1.pdf")
ani.options(pdftk = NULL)
file.info(c("huge-plot.pdf", "huge-plot0.pdf", "huge-plot1.pdf"))["size"]