Nearly any software in Linux that has the ability to print also has the option to print to file. The first step is to print to a .PS or .EPS file.
The second step is to make sure you have GhostScript installed. It has a number of functions, one of which is to turn .PS or .EPS to .PDF.
Then, from a command-line, all you need to do is
ps2pdf filename.ps , and it will create a .PDF with the same filename.
If you want to see one I've done... <<
CLICK HERE >>
There are a bunch of such commands... ps2ascii, ps2pdf, ps2pdf13, ps2pdfwr, ps2epsi, ps2pdf12, ps2pdf13, ps2pdf14 (the last three are for compatibility with older versions of Adobe Acrobat Reader), ps2ps, pdf2dsc, pdf2ps (to go from .PDF to .PS).