Skip to contents

bm_create_pdf() creates a pdf from a list of images (each representing a page).

Usage

bm_create_pdf(
  pages,
  output = NULL,
  ...,
  paper = getOption("papersize", "letter"),
  orientation = c("portrait", "landscape"),
  width = 8.5,
  height = 11,
  bg = "white"
)

Arguments

pages

A list of images (each representing a page).

output

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

...

Ignored.

paper

Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".

orientation

Either "portrait" or "landscape". Ignored if width and height are not missing.

width, height

Paper size in inches. Ignored if both are missing (in favor of paper and orientation).

bg

output pdf background color.

Value

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

Examples

f1 <- pdf_create_blank(paper = "a4", orientation = "landscape")
f2 <- pdf_create_blank(length = 4L)
unlink(f1)
unlink(f2)