Topic: tech myref prev next
tech myref > Printing Text to a Booklet
Using command line tools to turn plain text into a booklet
On Debian/Ubuntu, install the ‘texlive-extra-utils’ package;
apt install texlive-extra-utils
From Vim, run the command ‘:hardcopy > filename.ps’ to output the current document to a Postscript file. This includes page headers, including the page number and input filename. Then run ‘psbook filename.ps | psnup -s0.7 -2 | ps2pdf - filename-booklet.pdf’ to convert the Postscript file to a booklet and convert the output to a PDF.
(vim) :hardcopy > filename.ps | quit
(sh) psbook filename.ps | psnup -s0.7 -2 | ps2pdf - filename-booklet.pdf
Alternatively, run the ‘:hardcopy’ command from the command line.
vim -c ':hardcopy > filename.ps' filename
psbook filename.ps | psnup -s0.7 -2 | ps2pdf - filename-booklet.pdf