Create printable storage box jacket pdf
Source:R/pdf_create_jacket.R, R/pdf_create_jacket_instructions.R
pdf_create_jacket.Rdpdf_create_jacket() creates a printable storage box jacket.
pdf_create_4x6_jacket() is a wrapper targeting a 4x6 photo storage box.
pdf_create_poker_jacket() is an alternative targeting one or two poker deck storage boxes.
pdf_create_jacket_instructions() creates a printable sheet of
instructions for making such a jacket
(these instructions are repeated in the Details section below).
Usage
pdf_create_jacket(
output = NULL,
...,
front = NULL,
back = NULL,
spine = NULL,
inner = NULL,
paper = getOption("papersize", "letter"),
orientation = "landscape",
width = unit(JACKET_4x6_FRONT_WIDTH, "in"),
height = unit(JACKET_4x6_HEIGHT, "in"),
depth = unit(JACKET_4x6_SPINE_WIDTH, "in"),
bg = "transparent"
)
pdf_create_4x6_jacket(
output = NULL,
...,
front = NULL,
back = NULL,
spine = NULL,
inner = NULL,
paper = getOption("papersize", "letter")
)
pdf_create_poker_jacket(
output = NULL,
...,
front = NULL,
back = NULL,
spine = NULL,
inner = NULL,
paper = getOption("papersize", "letter"),
depth = unit(JACKET_POKER_SPINE_WIDTH, "in"),
bg = "transparent"
)
pdf_create_jacket_instructions(
output = NULL,
...,
paper = getOption("papersize", "letter"),
orientation = "landscape",
style = marquee::classic_style()
)Arguments
- output
Output pdf filename.
NULLdefaults totempfile(fileext = ".pdf").- ...
Ignored.
- front
Fill color/pattern/gradient or grob for front cover section of jacket Will be drawn in a viewport with a width of
widthand a height ofheight. IfNULL(default) we draw a template. Forpdf_create_poker_jacket()may also be a list with one or two of these values (in which case will generate two jackets).- back
Fill color/pattern/gradient or grob for back cover section of jacket Will be drawn in a viewport with a width of
widthand a height ofheight. IfNULL(default) we draw a template. Forpdf_create_poker_jacket()may also be a list with one or two of these values (in which case will generate two jackets).- spine
Fill color/pattern/gradient or grob for spine section of jacket Will be drawn in a rotated viewport with a width of
heightand a height ofdepth. IfNULL(default) we draw a template. Forpdf_create_poker_jacket()may also be a list with one or two of these values (in which case will generate two jackets).- inner
Fill color/pattern/gradient or grob for inner section of jacket. Will be drawn in a viewport with a width of
2 * width + depthinches and a height ofheightinches. IfNULL(default) we do not create page for inner section. Forpdf_create_poker_jacket()may also be a list with one or two of these values (in which case will generate two jackets).- paper
Paper size. Usually either "letter" or "a4" but in certain circumstances can be one of "letter", "a4", "poker", "bridge", "legal", "a5", "a3", "special".
- orientation
Either "portrait" or "landscape". Ignored if
widthandheightare not missing.- width
Width of the jacket face as a grid unit. For a 4x6 photo storage box a good value is 4.139 inches and for a poker deck storage box a good value is 2.6 inches.
- height
Height of the jacket face as a grid unit. For a 4x6 photo storage box a good value is 6.141 inches and for a poker deck storage box a good value is 3.6 inches.
- depth
Width of the spine as a grid unit. For a 4x6 photo storage box a good value is 1.052 inches and for a poker deck storage box a good value is 0.78 inches.
- bg
Background fill for the storage jacket. Passed to
grid.full().- style
A style set such as
marquee::classic_style()to be passed tomarquee::marquee_grob().
Details
To make the storage box jacket from the pdf file:
Print the jacket out (ideally on cardstock).
Print "actual size" (100%).
To include the jacket inside (if any) print double-sided.
Use the crop marks and origami symbols to cut and fold the jacket.
Exact procedure depends on your tools and preferred methods.
Example procedure #1:
Use the origami mountain fold lines to score the fold lines (e.g. using a ruler and a penknife).
Use the crop marks to cut the edges off.
Make two mountain folds using the scored lines along the spine.
Example procedure #2:
Use the crop marks to cut away the left and right edge.
Make a valley fold by touching the origami dots symbols along the top edge together and then flatten the paper to make the fold and then unfold flat. Repeat this procedure with the origami dot symbols along the bottom edge.
Cut away the top and bottom edges (you may use the ends of the origami mountain fold lines as well as the edges of the jacket as guide to where to make these cuts).
Make two mountain folds by reversing the (valley) creases.
Insert the jacket into the storage box.
See also
pdf_add_origami() to add origami symbols to pre-existing Boardgame Barrio's Small Board Game Jackets.
Examples
# Template `front`, `back`, and `spine`
if (requireNamespace("piecepackr", quietly = TRUE)) {
f1 <- pdf_create_4x6_jacket()
unlink(f1)
}
# Fill `front`, `back`, and `spine`
if (requireNamespace("piecepackr", quietly = TRUE)) {
f2 <- pdf_create_4x6_jacket(front = "red", back = "blue", spine = "purple")
unlink(f2)
}
# Grob `front`, `back`, and `spine`
if (requireNamespace("piecepackr", quietly = TRUE) &&
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.3)
pythagorean <- patternGrob("polygon_tiling", type = "pythagorean",
fill = pal[4], spacing = 0.1)
f3 <- pdf_create_4x6_jacket(front = herringbone, back = pythagorean,
spine = rhombille)
unlink(f3)
}