Skip to contents

Edit PDF files

The first positional argument is always the input pdf and the second positional argument is the output pdf (which always defaults to tempfile(fileext=".pdf")). Returns the output pdf invisibly.

pdf_add_cropmarks()
Add crop marks to a pdf
pdf_add_crosshairs()
Add crosshairs to a pdf
pdf_add_lines()
Add lines to a pdf
pdf_add_origami()
Add origami symbols to a pdf
pdf_add_overlay()
Overlay custom graphics on a pdf
pdf_add_rects()
Add (rounded) rectangles to a pdf
pdf_append_blank()
Append blank pages to a pdf
pdf_apply()
Modify selected pages on a pdf
pdf_change_paper() pdf_pad_paper()
Change pdf paper size
pdf_clean()
Copies pdf file while removing temporary pdf files
pdf_combine() pdf_compress() pdf_overlay_stamp() pdf_rotate_pages() pdf_subset()
Wrappers around qpdf functions
pdf_gs()
Process the pdf file with ghostscript
pdf_pdfxup() pdf_pdfxup_booklet()
N-up pages of a document with pdfxup
pdf_rasterize()
Rasterize a pdf
pdf_scale()
Scale pdf contents centered within the page
pdf_rep()
Repeat pages of a pdf
pdf_rm_crosshairs()
Remove crosshairs
pdf_set_bookmarks() pdf_set_docinfo() pdf_set_xmp()
Wrappers around xmpdf functions

Create PDF files

The first positional argument is always the output pdf (which always defaults to tempfile(fileext=".pdf")). Returns the output pdf invisibly.

pdf_create_blank()
Create pdf of blank pages
pdf_create_jacket() pdf_create_4x6_jacket() pdf_create_poker_jacket() pdf_create_jacket_instructions()
Create printable storage box jacket pdf
pdf_create_wallet()
Create print-and-play card wallet pdf

Other PDF utilities

ls_temp_pdfs() rm_temp_pdfs()
List and remove temporary pdfs
pdf_orientation()
Tell whether pdf is in portrait or landscape mode
pdf_pages()
Get integer vector of subset of pdf pages
pdf_paper()
Infer the paper size of a PDF document
pdf_render_raster()
Render a pdf page into a raster object
pdf_width() pdf_height()
Get dimensions of pdf pages

Layout data frames

layout_grid()
Layout data frame for a grid of identically sized components
layout_name_fn()
Function to generate layout names
layout_octavo()
Layout data frame for an octavo booklet signature
layout_preset() layout_names()
Layout data frame for a named preset

{bittermelon} pixmap object utilities

bm_create_pdf()
Create a pdf from a list of images
bm_crop_layout()
Crop out a component from a print-and-play layout
bm_rm_crosshairs()
Remove crosshairs from a raster object
bm_split_layout()
Extract components from a print-and-play layout
pdf_render_bm_list()
Render all pages of a pdf into bittermelon pixmap objects
pdf_render_bm_pixmap()
Render a pdf page into a bittermelon pixmap object
zip_extract_bm_pixmap()
Extract/render an image from a zipfile into a bittermelon pixmap object

{grid} utilities

fullGrob() grid.full() as_fill()
A rectangular grob filled with a color, image, or pattern.
grid_add_cropmarks()
Draw crop marks around components
grid_add_origami_bb() grid_add_origami()
Draw origami fold symbols
grid_add_crosshairs()
Draw crosshairs at component corners
grid_add_layout()
Draw images to a layout with grid
grid_add_lines()
Draw lines along component edges
grid_add_rects()
Draw (rounded) rectangles around components

Package options

pnpmisc-package pnpmisc
pnpmisc: Utilities for Print-and-Play Board Games