cpdf -create-pdf [-create-pdf-pages <n>]
[-create-pdf-papersize <paper size>] -o out.pdf
cpdf -typeset <text file> [-create-pdf-papersize <size>]
[-font <font>] [-font-size <size>] -o out.pdf
We can build a new PDF file, given a number of pages and a paper size. The default is one page, A4 portrait.
cpdf -create-pdf -create-pdf-pages 20
-create-pdf-papersize usletterportrait -o out.pdf
The standard paper sizes are listed in Section 3.1, or you may specify the width and height directly, as described in the same chapter.
A basic text to PDF convertor is included in cpdf. It takes a UTF8 text file (ASCII is a subset of UTF8) and typesets it ragged-right, splitting on whitespace. Both Windows and Unix line endings are allowed.
cpdf -typeset file.txt -create-pdf-papersize a3portrait
-font Courier -font-size 10 -o out.pdf
The standard paper sizes are listed in Section 3.1, or you may specify the width and height directly, as described in the same chapter. The standard fonts are listed in chapter 8. The default font is TimesRoman and the default size is 12.