Chapter 18
Drawing on PDFs

cpdf in.pdf [<range>] -draw <draw operations> [-underneath] -o out.pdf
cpdf -text-width <text> [-font <font>] [-fontsize <fontsize>]

Building and showing paths
-rect Draw rectangle
-to Move to
-line Add line to path
-bez Add Bezier curve to path
-bez23 Add Bezier curve to path
-bez13 Add Bezier curve to path
-circle Add circle to path
-stroke Stroke path
-fill Fill path
-filleo Fill path, even odd
-strokefill Stroke and fill path
-strokefilleo Stroke and fill path, even odd
-close Close path

Clipping with paths
-clip Clip
-clipeo Clip, even odd

Path parameters
-strokecol Set stroke colour
-fillcol Set fill colour
-thick Set stroke thickness
-cap Set cap
-join Set join
-miter Set miter limit
-dash Set dash pattern

The graphics stack and matrices
-push Push graphics stack
-pop Pop graphics stack
-matrix Append to graphics matrix
-mtrans Translate the graphics matrix
-mrot Rotate the graphics matrix
-mscale Scale the graphics matrix
-mshearx Shear the graphics matrix in X
-msheary Shear the graphics matrix in Y

Re-use with XObjects
-xobj-bbox Specify the bounding box for xobjects
-xobj Begin saving a sequence of graphics operators
-end-xobj End saving a sequence of graphics operators
-use Use a saved sequence of graphics operators

Images
-draw-jpeg Load a JPEG from file and name it
-draw-png Load a PNG from file and name it
-image Draw an image which has already been loaded

Transparency
-fill-opacity Set opacity
-stroke-opacity Set stroke opacity

Text
-bt Begin text
-et End text
-text Draw text
-stext Draw text with %specials
-leading Set leading
-charspace Set character spacing
-wordspace Set word space
-textscale Set text scale
-rendermode Set text rendering mode
-rise Set text rise
-nl New line

The next page
-newpage Move to a fresh page

Please see the PDF version of the manual for the documentation to this chapter.