Skip to contents

Compress a pdf file

Usage

pdf_compress(input, output = NULL, linearize = FALSE, password = "")

Arguments

input

path or url to the input pdf file

output

base path of the output file(s)

linearize

enable pdf linearization (streamable pdf)

password

string with password to open pdf file

Value

a character vector with the path of the compressed pdf file

Examples

pdf_file <- system.file("examples", "sufganiyot.pdf", package = "cpp11qpdf")
fout <- tempfile()
pdf_compress(pdf_file, fout, TRUE, "")
#> [1] "/tmp/RtmpOgvruH/file27fb43939075d.pdf"