Skip to main content

KiCAD Gerber PDF Generator

Project description

Board2Pdf

Board2Pdf is a KiCad Action Plugin to create good looking pdf files from the board. The outputted pdf is vector based and searchable.

Two examples of what the plugin can output can be found here:
armory-Assembly.pdf ( 1 982 kB) Project is found here
hackrf-one-Assembly.pdf ( 1 579 kB) Project is found here

When loaded the plugin looks like this. Here the user can configure how the pdf shall look. Screenshot

This plugin ONLY works with the KiCad 6.0 and later. It does NOT work with KiCad 5.1.x or earlier versions.

https://gitlab.com/dennevi/Board2Pdf/

Installation

The easiest way to install is to open KiCad -> Plugin And Content Manager. Select Board2Pdf in the Plugins tab, press Install and then Apply Changes.

If you only want to use the CLI (use Board2Pdf from the command line) you can also install Board2Pdf using pip: pip install board2pdf. Then you can use the Board2Pdf CLI by calling board2pdf just like any other application installed from pip.

For instructions on manual installation from the repo, see Wiki - Installation

Also, see Dependencies below.

Dependencies

For basic functionality Board2Pdf uses pypdf which is included when installing Board2Pdf. You don’t need to install any dependencies if this functionality is enough for you.

If you install PyMuPDF you can create the pdf files faster. It also enables you to convert the output file to SVG, and it has better support for bookmarks (table of content).

Board2Pdf uses pdfCropMargins for some of the crop and scaling options. pdfCropMargins includes PyMuPDF so if you choose to install pdfCropMargins you don't have to install PyMuPDF.

More information in Wiki - Install dependencies.

Problem with Ubuntu and some other Linux distros

When PyMuPDF (fitz) is installed with pip, KiCad crashes with a segmentation fault when Board2Pdf is loaded. Board2Pdf loads when the PCB Editor loads, so the crash happens directly when the PCB Editor is started. If this happens to you, you have two options:

  1. Uninstall PyMuPDF using python -m pip uninstall --upgrade PyMuPDF or pip uninstall --upgrade PyMuPDF and use pypdf instead.
  2. Uninstall PyMuPDF as in (1), but install it again using the apt package manager: sudo apt install python3-fitz

Usage - GUI

The plugin includes a default configuration which should make it more or less self explanatory if you test it out. The basic idea is that each template will result in a page in the pdf file that's created by this plugin. You can enable any number of templates to get different views and color modes of the pcb. Each template can be individually configured to give the desired output. It's completely up to you which layers to show, and which colors the layers shall have.

More information can be found in the Wiki - Usage GUI.

Usage - CLI

Board2Pdf can be executed from the command line using python board2pdf-cli.py {PROJECT}.kicad_pcb. If installed using pip install the binary can be executed using board2pdf {PROJECT}.kicad_pcb.

More information can be found in the Wiki - Usage CLI.

Support

First search the KiCad forum to see if someone else has asked the same thing. If not, post your question in the forum and tag me by writing @albin. That way I will see your post and answer as soon as I can.

Contributing

If you find a bug, please add an issue in the GitLab project.

If you make some improvements, please issue a pull request. All help is appreciated!

Read DEVELOPMENT.md for information on how to build Board2Pdf.

Authors and acknowledgment

This script is written by Albin Dennevi, with contributions from others. If you need to come in contact with me please use the KiCad forum as described under Support. But for bugs and feature requests, please add an issue in GitLab.

Credit goes to qu1ck, the author of the InteractiveHtmlBom plugin. I used the GUI of this project as a starting point when making the GUI for this project.

License

This plugin is licensed under the open-source GNU GPL license, version 3.0 or later. A copy of the license is included in this software, and it can also be viewed here. This is the same license as pdfCropMargins is licensed under, personally I would've choosen a more open license.

Project status

This project is considered to be finished. When serious bugs are reported I will try my best to fix them, but don't expect too much progress in adding features from my side.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

board2pdf-1.8.0.tar.gz (3.9 MB view details)

Uploaded Source

File details

Details for the file board2pdf-1.8.0.tar.gz.

File metadata

  • Download URL: board2pdf-1.8.0.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for board2pdf-1.8.0.tar.gz
Algorithm Hash digest
SHA256 2e1527be2150efc537fde65bb09b56a33a23b7b6b1307bf07f5df72204da01f1
MD5 059ddb3db23b1b49816df19212ca6775
BLAKE2b-256 d215af11c5fbd95c311db24c430fd660671da2d81a5139319318042ae9ee388b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page