Making PDFs of schematics created from gschem

2 replies [Last post]
mcorne
Offline
Contributor
Joined: 17 Apr 2007
Posts:

To make PDFs of schematics I use a simple two line script that utilizes the ghostscript package. This can also be easily modified to include the layout from PCB as well as the schematic information.

gs -q -dSAFER -dNOPAUSE -dBATCH -sPaperSize=tabloid -sOutputFile=output.pdf -sDEVICE=pdfwrite -c .setpdfwrite -f page1.ps page2.ps ... pagexx.ps
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=combined_out.pdf Coverpage.pdf output.pdf anything_else.pdf

Steps needed to make a complete PDF:

1.) Print the schematics to a postscript file. (File->Print and then select file)
2.) Modify the above lines so that -sPaperSize= the size of the .ps (default is letter)
3.) Make page1.ps etc the names you saved your .ps pages to.
4.) If you want to attach other PDF files into the same PDF that is what the second line is for

dwolpoff
dwolpoff's picture
Offline
Forum Administrator
Joined: 17 Apr 2007
Posts:
Shorthanding....

If you have a single page you want to turn into a pdf, print to postscript, and then use "ps2pdf" which is provided by ghostscript. (Documentation here)

dwolpoff
dwolpoff's picture
Offline
Forum Administrator
Joined: 17 Apr 2007
Posts:
PCB Notes

In PCB "File->Export" and then select "ps" and you'll get a dialog prompting you to select options-- there's one hidden down at the bottom: "multi-file" if you choose it, you'll get a single postscript file for each layer- this makes it a little easier to organize how you want your final PDF to look, because you can order/remove pages easily when passing it to the scripts above...
Also note that resultant pdf's for gschem schematics will be text searchable, whereas PCB pdf's will not.