pdf_rotate_pages: Rotate pages in a pdf file

View source: R/qpdf.R

pdf_rotate_pagesR Documentation

Rotate pages in a pdf file

Description

Rotate pages in a pdf file

Usage

pdf_rotate_pages(
  input,
  pages,
  angle = 90,
  relative = FALSE,
  output = NULL,
  password = ""
)

Arguments

input

path or url to the input pdf file

pages

a vector with page numbers to rotate

angle

rotation angle in degrees (positive = clockwise)

relative

if TRUE, pages are rotated relative to their current orientation. If FALSE, rotation is absolute (0 = portrait, 90 = landscape, rotated 90 degrees clockwise from portrait)

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 rotated pdf file

Examples

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

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