Eeschema to pdf


#1

Hello, i found this code on github that converts layers of pcb to pdf files, it works ok. My programming skills arent so good. My idea is to use a single terminal command to generate a pdf file which will contain eeshema file, layout file (like gerber) and BOM.

Here is a code for layout -> pdf
Can someone help me a bit guide me what to do where to start, in order to accomplish it. Thank you


#2

Line number 56 says (with some programming skills needed) that you have to run

python plot_board.py "yourPCB.kicad_pcb" "outputFolder"

Print the Eeschema PDF. This could be your major problem, since Eeschema still not having a python library or external command that you could use to do a external print.
After you have to merge the PDF (search for some python library about: https://stackoverflow.com/questions/3444645/merge-pdf-files)


#3

The python script you linked will only produce layouts (pdf/svg/gerbers) from pcbnew. It is not possible to produce schematic layouts from eeschema in the same way as there is not (as of yet) any python interface to eeschema. Hopefully in Kicad 6 (or maybe 7)…

There have been a number of projects trying to achieve this; either by automating the Kicad interface or by rendering the schematic with an alternative rendering mechanism. There are two projects currently that i am aware of;

  1. https://github.com/jnavila/plotkicadsch where the author has developed a script to plot schematics and render diffs of git
    repositories - it might be worth a look.

  2. https://neo900.org/stuff/eeshow/ where comparing visual diffs of various schematic revisions has been demonstrated (I could only get this to run under Ubuntu).


#4

Using Version: 5.0.2+dfsg1-1~bpo9+1, release build, I printed my schematic to a pdf file from eeschema by selecting Print…Page Setup…
and selecting the Generic-CUPS-PDF-Printer. I printed it to a file.


#5

Thank you veru much. I will see what i can do.


#6

Maybe this will be the future feature needed for your goal
https://bugs.launchpad.net/kicad/+bug/1636549


#7

it is also possible to plot directly to PDF

image


#8

Hello, when you installed eeshow did you accomplish to enter eeshow with commands such as: eeshow (your project name).pro and seeing the parts. Also with the command: eeplot -o (your project).pdf (your project).pro i get errors for the device.lib library. Any project i try but all seems fine? Thank you


#9

I can’t really help you much with eeshow - you might need to contact the developer. I have only tried this a few times but found eeplot -o OUTPUT.pdf PROJECT.pro invoked within the project directory works on the command line to produce a pdf. I only managed to get it to work on Ubuntu though.

I am not entirely sure of your use case. At first I thought you wanted a programatic way to produce a print of the schematic as you linked to a script but maybe I misconstrued your intent. As others have mentioned, it is obviously simple to produce a pdf using the plot dialog but rather harder to achieve the same programatically.