pdf_create_wallet() creates print-and-play card origami wallets pdfs.
Arguments
- output
Output pdf filename.
NULLdefaults totempfile(fileext = ".pdf").- ...
Ignored.
- front
Fill color/pattern/gradient or grob for front cover section of wallet. Will be drawn in a rotated masked viewport with a width of
2 + 2 * bleedinches and a height of8 + 2 * bleedinches. IfNULL(default) we draw a template.- back
Fill color/pattern/gradient or grob for back cover section of wallet. Will be drawn in a rotated masked viewport with a width of
2 * 2 * bleedinches and a height of8 + 2 * bleedinches. IfNULL(default) we draw a template.- spine
Fill color/pattern/gradient or grob for spine section of wallet. Will be drawn in a masked viewport with a width of
8 + 2 * bleedinches and a height of6 + 2 * bleedinches. IfNULL(default) we draw a template.- bleed
Bleed zone size to assume:
If
bleedis agrid::unit()simply use itIf
bleedis numeric then convert viagrid::unit(bleed, "in")If
bleedisTRUEassume 1/8 inch bleed zone sizeIf
bleedisFALSEassume 0 inch bleed zone size
- paper
Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".
Value
output pdf file name invisibly.
As a side effect creates a print-and-play card wallet pdf file.
Details
To make the wallets from the pdf files:
Print out two-sided flipping on the long edge
Using the crop marks on the first page (the page showing the "spine") trim the edges with a cutting tool (the four dots should now be at the corner of each page).
Make the four corner valley folds each labeled "Folds 1"
Make the two valley folds each labeled "Folds 2"
Flip over the paper and make the two valley folds each labeled "Folds 3"
Fold in half (valley fold)
Examples
# Template `front`, `back`, and `spine`
if (requireNamespace("piecepackr", quietly = TRUE) &&
getRversion() >= "4.1") {
f1 <- pdf_create_wallet()
unlink(f1)
}
# Fill `front`, `back`, and `spine`
if (requireNamespace("piecepackr", quietly = TRUE) &&
getRversion() >= "4.1") {
f2 <- pdf_create_wallet(front = "red", back = "blue", spine = "purple")
unlink(f2)
}
# Grob `front`, `back`, and `spine` with bleed
if (requireNamespace("piecepackr", quietly = TRUE) &&
getRversion() >= "4.1" &&
require("gridpattern", quietly = TRUE)) {
pal <- grDevices::palette()
herringbone <- patternGrob("polygon_tiling", type = "herringbone",
fill = pal[2], spacing = 0.1)
rhombille <- patternGrob("polygon_tiling", type = "rhombille",
fill = pal[3], spacing = 0.2)
pythagorean <- patternGrob("polygon_tiling", type = "pythagorean",
fill = pal[4], spacing = 0.1)
f3 <- pdf_create_wallet(front = herringbone, back = rhombille,
spine = pythagorean, bleed = TRUE)
unlink(f3)
}