User Tools

Site Tools


kicad:good_pdf_output_from_kicad

This is an old revision of the document!


Good PDF output from KiCad in Linux

There are several ways to generate PDF documents of Eeschema files under Linux. The most reliable way I've found is to first plot to PostScript (File > Plot > Plot PostScript) and then use the ps2pdf1) command from ghostscript to convert to PDF:

ps2pdf -dOptimize=true -sPAPERSIZE=11x17 *.ps

The biggest problems with this are:

  1. It’s a lot of typing to get the conversion to happen (the minutia of which you won’t have memorized).
  2. It leaves you with both a PostScript and a PDF of the document(s), one of which is likely to get out of sync with the other, which may or may not be in sync with the actual schematic, etc.

To help with this, I use the script below. I drop a copy of it into the root of a KiCad project and edit the OPTIONS as needed for the project. Then whenever I want PDFs of my schematics, I plot PostScript from Eeschema and then click on this script in my file manager. Note that running this script will destroy any *.ps files in the directory—that’s by design.

makepdf
#!/bin/bash
 
# DESTRUCTIVELY convert all postscript files
# in working directory to PDF.
# Requires ghostscript.
 
# Mithat Konar 2013 (http://mithatkonar.com)
 
OPTIONS="-dOptimize=true -sPAPERSIZE=11x17"
 
FILES=$(ls -1 *.ps)
 
for file in $FILES
do
  ps2pdf $OPTIONS $file && rm $file
done

I’ve not tried the script on PostScript files other than those produced by Eeschema, but I’ve got no reason to think it won’t work on other PostScript files as well.

1)
The Arch wiki has a good writeup on ps2pdf.
kicad/good_pdf_output_from_kicad.1369068298.txt.gz · Last modified: 2013/05/20 16:44 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki