Skip to contents

pdf_width() and pdf_height() get the dimensions of the pdf file pages.

Usage

pdf_width(input, ..., units = "inches", numeric = FALSE)

pdf_height(input, ..., units = "inches", numeric = FALSE)

Arguments

input

Input pdf filename.

...

Ignored.

units

Units to use. See grid::unit().

numeric

If TRUE return numeric else a grid::unit() object.

Value

If numeric = TRUE a numeric vector else a grid::unit() object.

Examples

f <- pdf_create_blank(width = 8.5, height = 11)
pdf_width(f)
#> [1] 8.5inches
pdf_height(f, units = "cm")
#> [1] 27.94cm
pdf_height(f, units = "mm", numeric = TRUE)
#> [1] 279.4
unlink(f)