powered by
Compresses a PDF (into a new PDF).
# S3 method for default compressPDF(filename, path=NULL, outFilename=basename(pathname), outPath="compressedPDFs", skip=FALSE, overwrite=FALSE, compression="gs(ebook)+qpdf", ...)
The filename and (optional) path of the PDF to be compressed.
The generated PDF.
If TRUE and an existing output file, then it is returned.
TRUE
If FALSE, an error is thrown if the output file already exists, otherwise not.
FALSE
A character vector of compression methods to apply. This overrides any low-level arguments passed via ... that compactPDF.
character
vector
...
compactPDF
Additional arguments passed to compactPDF, e.g. gs_quality.
gs_quality
Returns the pathname of the generated PDF.
Internally compactPDF is utilized.
# NOT RUN { pathnameZ <- compressPDF("report.pdf") # }
Run the code above in your browser using DataLab