save_print_and_play: Save piecepack print-and-play (PnP) file

Description Usage Arguments Examples

View source: R/save_print_and_play.R

Description

Save piecepack print-and-play (PnP) file

Usage

1
2
3
4
5
6
7
save_print_and_play(
  cfg = getOption("piecepackr.cfg", pp_cfg()),
  output_filename = "piecepack.pdf",
  size = "letter",
  pieces = c("piecepack", "matchsticks", "pyramids"),
  arrangement = "single-sided"
)

Arguments

cfg

Piecepack configuration list or pp_cfg object

output_filename

Filename for print-and-play file

size

PnP output size (currently either "letter", "A4", or "A5")

pieces

Character vector of desired PnP pieces. Supports "piecepack", "matchsticks", "pyramids", "subpack", or "all".

arrangement

Either "single-sided" or "double-sided".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  
    is_mac <- tolower(Sys.info()[["sysname"]]) == "darwin"
    if (capabilities("cairo") && !is_mac) {
        cfg <- pp_cfg(list(invert_colors.suited=TRUE))
        save_print_and_play(cfg, "my_pnp_file.pdf")
        save_print_and_play(cfg, "my_pnp_file_ds.pdf", arrangement="double-sided")
        save_print_and_play(cfg, "my_pnp_file_A4.pdf", size="A4", pieces="all")
        save_print_and_play(cfg, "my_pnp_file_A5.pdf", size="A5")
        unlink("my_pnp_file.pdf")
        unlink("my_pnp_file_ds.pdf")
        unlink("my_pnp_file_A4.pdf")
        unlink("my_pnp_file_A5.pdf")
    }
  

trevorld/piecepack documentation built on July 22, 2021, 3:26 a.m.