Skip to contents

pdf_rm_crosshairs() removes unwanted crosshairs.

Usage

pdf_rm_crosshairs(input, output = NULL, ..., layout = "poker_3x2_bleed")

Arguments

input

Input pdf filename.

output

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

...

Passed to pdf_apply().

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.

Value

output pdf file name invisibly. As a side effect removes from crosshairs from a pdf.

Details

  • In order to work the PnP layout needs a solid color bleed.

  • The default layout supports Galdor's Grip (PnP letter size v1).

Examples

if (requireNamespace("bittermelon", quietly = TRUE) &&
    requireNamespace("piecepackr", quietly = TRUE) &&
    utils::packageVersion("piecepackr") >= "1.14.0-5") {
  f1 <- pdf_create_blank(length = 2L, orientation = "landscape")
  f2 <- pdf_add_crosshairs(f1, pages = "all",
                           layout = "poker_3x2_bleed")
  f3 <- pdf_rm_crosshairs(f2, pages = "odd",
                          layout = "poker_3x2_bleed", dpi = 75)
  unlink(f1)
  unlink(f2)
  unlink(f3)
}
#> The original pdf contents were rasterized.
#> ℹ We needed to edit the contents with a bitmap function.`
#> ℹ Suppress this message with `suppressMessages(expr, classes = "pnpmisc_message_rasterized")`.