pdf_subset: Subset a pdf file to a new pdf file containing the selected...

View source: R/qpdf.R

pdf_subsetR Documentation

Subset a pdf file to a new pdf file containing the selected pages

Description

Subset a pdf file to a new pdf file containing the selected pages

Usage

pdf_subset(input, pages = 1, output = NULL, password = "")

Arguments

input

path or url to the input pdf file

pages

a vector with page numbers to select. Negative numbers means removing those pages (same as R indexing)

output

base path of the output file(s)

password

string with password to open pdf file

Value

a character vector with the path of the subsetted pdf file

Examples

pdf_file <- system.file("examples", "sufganiyot.pdf", package = "cpp11qpdf")
fout <- tempfile()
pdf_subset(pdf_file, 1, fout, "")

cpp11qpdf documentation built on April 4, 2025, 4:39 a.m.