Skip to contents

pdf_add_lines() adds lines along the components of a print-and-play layout.

Usage

pdf_add_lines(input, output = NULL, ..., layout = "poker_3x3", gp = gpar())

Arguments

input

Input pdf filename.

output

Output pdf filename. NULL defaults to a tempfile() with a ___pnpmisc.pdf file extension.

...

Passed to pdf_add_overlay().

layout

Either a layout preset name in layout_names() or a data frame with layout data (as returned by layout_grid()). A preset name is centered on the paper size of the input pdf's (selected) pages as inferred by pdf_paper(); it is an error if those pages don't all share a supported paper size.

gp

Passed to grid::grid.segments().

Value

output pdf file name invisibly. As a side effect creates pdf file with added line segments.

Examples

f1 <- pdf_create_blank(length = 2L, paper = "letter")
f2 <- pdf_add_lines(f1, layout = "poker_3x3")
unlink(f1)
unlink(f2)