Sunday, March 23, 2008

Printing to pdf file on linux

The easiest way to do it is
1. Print whatever to file.. This produces a ps file (.ps extension preferred)
2. Convert the postscript to pdf with ps2pdf command
However, I also wanted to try setting up a pdf printer, primarily because I remember the redhat 9, which I used to use once a long long time ago, to have had one.
To do it this way on OpenSuSE 10.3
1. Download and install the cups-pdf package.. You can find an RPM if you search on OpenSuSE 10.3 doesn't seem to have an rpm for this.
2. If using kde, go to: kmenu > utilities > printing > manage printers. Gnome should have something similar.
3. There, choose to add a new printer..
4. In the step 1 there, choose the "Virtual PDF printer"in the detected list.
5. In the step 2 there, choose "Generic" for manufacturer, "postscript printer" or "PostScript color printer rev4" as model, and "Standard" as driver..
6. Apply.. Your new printer should now become listed
7. Right click on the new printer and choose properties. There, fiddle around and configure things as you want. Once you are done, click print test page.
8. The pdf generated is saved to your home folder.

Now on, you can use this printer to print to pdf file from any application. The generated pdf is saved in your home directory with the filename ".pdf"

No comments: