save_pdf¶
Lays out the cards in a gride and renders a PDF.
Options¶
- file
default:
'output.pdf'
the name of the PDF file to save. Will be overwritten without warning.
- dir
default:
_output
the directory to save to. Created if it doesn’t exist.
- sprue
default:
nil
the sprue file to use. If
nil
, then no sprue is used and the cards are laid out automatically using the parameters below. If non-nil, Squib checks for a built-in sprue file of that name. Otherwise, it attempts to open a file relative to the current directory. For more information on Squib Sprues, see Sprue Thy Sheets. If you use the trim function (see trim option below) the cards are placed considering coordinates reduced by the trim value. A special case is a sprue file which defines one card per sheet: If you use the trim option then the sheet size will be trimmed as well to remove the otherwise added white border in the PDF.- width
default:
3300
the height of the page in pixels. Default is 11in * 300dpi. Supports Unit Conversion.
- height
default:
2550
the height of the page in pixels. Default is 8.5in * 300dpi. Supports Unit Conversion.
- margin
default:
75
the margin around the outside of the page. Supports Unit Conversion.
- gap
default:
0
the space in pixels between the cards. Supports Unit Conversion.
- trim
default:
0
the space around the edge of each card to trim (e.g. to cut off the bleed margin for print-and-play). Supports Unit Conversion. Must be the same for all cards.
- trim_radius
default:
0
the rounded rectangle radius around the card to trim before saving. Supports Unit Conversion. Must be the same for all cards.
- crop_marks
default:
false
When
true
, draws lines in the margins as guides for cutting. Crop marks factor in thetrim
(if non-zero), and can also be customized viacrop_margin_*
options (see below). Has no effect ifmargin
is 0.
Warning
Enabling this feature will draw lines to the edge of the page. Most PDF Readers, by default, will recognize this and scale down the entire PDF to fit in those crop marks - throwing off your overall scale. To disable this, you will need to set Print Scaling “Use original” or “None” when you go to print (this looks different for different PDF readers). Be sure to test this out before you do your big print job!!
- crop_margin_bottom
default: 0
The space between the bottom edge of the (potentially trimmed) card, and the crop mark. Supports Unit Conversion. Has no effect if
crop_marks
isfalse
.- crop_margin_left
default: 0
The space between the left edge of the (potentially trimmed) card, and the crop mark. Supports Unit Conversion. Has no effect if
crop_marks
isfalse
.- crop_margin_right
default:
0
The space between the right edge of the (potentially trimmed) card, and the crop mark. Supports Unit Conversion. Has no effect if
crop_marks
isfalse
.- crop_margin_top
default:
0
The space between the top edge of the (potentially trimmed) card, and the crop mark. Supports Unit Conversion. Has no effect if
crop_marks
isfalse
.- crop_stroke_color
default:
:black
The color of the crop mark lines. Has no effect if
crop_marks
isfalse
.- crop_stroke_dash
default:
''
Define a dash pattern for the crop marks. This is a special string with space-separated numbers that define the pattern of on-and-off alternating strokes, measured in pixels or units. For example,
'0.02in 0.02in'
will be an equal on-and-off dash pattern. Supports Unit Conversion. Has no effect ifcrop_marks
isfalse
.- crop_stroke_width
default:
1.5
Width of the crop mark lines. Has no effect if
crop_marks
isfalse
.- rtl
default
false
whether to render columns right to left, used for duplex printing of card backs
- range
default:
:all
the range of cards over which this will be rendered. See Using range to specify cards