compressPDF

0th

Percentile

Compresses a PDF (into a new PDF)

Compresses a PDF (into a new PDF).

Keywords
file, IO
Usage
# S3 method for default
compressPDF(filename, path=NULL, outFilename=basename(pathname),
  outPath="compressedPDFs", skip=FALSE, overwrite=FALSE, compression="gs(ebook)+qpdf",
  ...)
Arguments
filename, path

The filename and (optional) path of the PDF to be compressed.

outFilename, outPath

The generated PDF.

skip

If TRUE and an existing output file, then it is returned.

overwrite

If FALSE, an error is thrown if the output file already exists, otherwise not.

compression

A character vector of compression methods to apply. This overrides any low-level arguments passed via ... that compactPDF.

...

Additional arguments passed to compactPDF, e.g. gs_quality.

Value

Returns the pathname of the generated PDF.

See Also

Internally compactPDF is utilized.

Aliases
  • compressPDF.default
  • compressPDF
Examples
# NOT RUN {
  pathnameZ <- compressPDF("report.pdf")
# }
Documentation reproduced from package R.utils, version 2.8.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.