1 - Integrate pdf-tools.cc with the rest of the code
2 - What if an input page specifies /Rotate?
5 - Clean up debugging messages, use more levels
7 | # Position bbox on a new paper
9 | paper(w=210mm,h=297mm,pos=(t|b|c)(l|r|c))
11 | # Scale paper to a new size
13 | scaleto(w=210mm,h=297mm,pos=tl)
15 | # Fit image to a paper
16 | # If paper is given: scale image
17 | # If no paper is given: adjust paper to image + margins
20 | margin= hmargin= vmargin=
21 | lmargin= rmargin= tmargin= bmargin=
26 | expand(h=10mm, v=20mm)
27 | expand(l=10mm, r=10mm, t=10mm, b=10mm)
29 | # Adjust image size (in terms of margins around)
30 | margins ... params like expand
33 | mark=box # Box around image
34 | mark=cross # Crosses in the corners
35 | mark=out # Out-pointing half-crosses in the corners (default)
36 | mark=in # In-pointing half-crosses
37 | mark=bg # Colored background
38 | pen=1pt # Line width
39 | len=5mm # Cross arm length
40 | offset=5mm # Distance from border
48 | bleed=5mm # Allow bleeding over the image box
50 # Can be written as: mix(cat) { modulo(2){1}, modulo(2){2} }
59 | # Add an empty page after the current one
65 | # - paper size + margins
68 | by=rows/cols # Filling order (default: rows)
69 | by=tile # Tile with copies of a single page
70 | paper / w / h # Specify paper size, default=copy from 1st image
71 | + fit options (*margin, pos)
72 | tpos=... # Position of images inside their tiles (default: tl)
73 | crop # Crop to image
74 | mixed # Allow images of different sizes
75 | rotate=1 # Override rotation decision
76 | scale=1 # Override scaling factor
77 | hspace / vspace / space # Distance between tiles
78 | cmark, cpen, clen, coffset, ccolor # Cropmark parameters
80 # Send pages to multiple pipes and merge their results
82 cat # Concatenate results (default is interleave)
83 cycle # When one pipe ends earlier, cycle it from start
84 pad # When one pipe ends earlier, add blank pages