pdf_add_crosshairs() adds crosshairs to the corners of components of a print-and-play layout.
Arguments
- input
Input pdf filename.
- output
Output pdf filename.
NULLdefaults totempfile(fileext = ".pdf").- ...
Passed to
pdf_add_overlay().- layout
Either a layout preset name in
layout_names()or a data frame with layout data (as returned bylayout_grid()).- gp, ch_width, ch_grob
Passed to
piecepackr::grid.crosshair().ch_grobdefaults topiecepackr::squaresCrosshairGrob().
Examples
if (pnpmisc:::donttest() &&
requireNamespace("piecepackr", quietly = TRUE) &&
utils::packageVersion("piecepackr") >= "1.14.0-5") {
input <- pdf_create_blank(length = 2L, width = 11, height = 8.5)
output <- pdf_add_crosshairs(input, pages = "odd",
layout = "button_shy_cards")
unlink(input)
unlink(output)
}
#> The original pdf contents were rasterized.
#> ℹ `any(pages != "all")` but `qpdf::pdf_overlay_stamp()` does not support a `pages` argument as of v1.4.1.
#> ℹ Suppress this message with `suppressMessages(expr, classes = "pnpmisc_message_rasterized")`.