Skip to contents

pdf_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. NULL defaults to tempfile(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 width and a height of height. If NULL (default) we draw a template. For pdf_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 width and a height of height. If NULL (default) we draw a template. For pdf_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 height and a height of depth. If NULL (default) we draw a template. For pdf_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 + depth inches and a height of height inches. If NULL (default) we do not create page for inner section. For pdf_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 width and height are 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 to marquee::marquee_grob().

Details

To make the storage box jacket from the pdf file:

  1. Print the jacket out (ideally on cardstock).

    • Print "actual size" (100%).

    • To include the jacket inside (if any) print double-sided.

  2. 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:

      1. Use the origami mountain fold lines to score the fold lines (e.g. using a ruler and a penknife).

      2. Use the crop marks to cut the edges off.

      3. Make two mountain folds using the scored lines along the spine.

    • Example procedure #2:

      1. Use the crop marks to cut away the left and right edge.

      2. 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.

      3. 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).

      4. Make two mountain folds by reversing the (valley) creases.

  3. 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)
}