Skip to contents

pdf_rasterize() re-renders a pdf by rasterizing each page.

Usage

pdf_rasterize(input, output = NULL, ..., dpi = getOption("pnpmisc.dpi", 300))

Arguments

input

Input pdf filename.

output

Output pdf filename. NULL defaults to tempfile(fileext = ".pdf").

...

Passed to pdf_apply().

dpi

Dots per inch. Passed to pdftools::pdf_render_page() when we rasterize the original content. Defaults to getOption("pnpmisc.dpi", 300).

Value

output pdf file name invisibly. As a side effect creates a rasterized pdf.

See also

pdf_apply() which this function wraps.

Examples

f1 <- pdf_create_blank(length = 2L, paper = "letter")
f2 <- pdf_rasterize(f1, dpi = 75)
unlink(f1)
unlink(f2)