Fix Xfig's landscape postscript output for printing

John Peck
Published

It's important to get the page orientation correct if you think your Xfig output might ever be printed. I was trying to make a cable drawing inside a titleblock with Xfig. The postscript output viewed by qpdfview is shown below.

raw ps output

You can see that this will never print properly, and the ps2pdf command simply gives you a pdf version of the same problem. Ghostscript's ps2write device can fix the orientation with:

gs -dSAFER -dBATCH -sDEVICE=ps2write -dNOPAUSE -sOutputFile=out.ps xfig_input.ps

where the other command-line options are documented here. This produces the output below:

fixed ps output

...which can be converted to pdf and printed.