Board2Pdf - Export a customized pdf of the board

I’ve never been satisfied with the result from printing the board using a pdf printer. At least for me the resulting files haven’t been searchable and the resolution has been to low for small components such as 0402 resistors. Using the plot function in KiCad to plot to pdf gives great result, but with one layer per pdf and all in black.

I got tired of this and finally made a plugin that gives me the result I want. It would be fun if someone else found it useful as well. Please try it out and leave any feedback in this thread or by creating an Issue in the Gitlab project.

I’ve tested the plugin on two different open source projects to show the result. Here are the pdf files created by the plugin:
armory-Assembly.pdf (1 982 KB) Project is found here
hackrf-one-Assembly.pdf (1 579 KB) Project is found here

The plugin is found here:

The plugin requires 6.0.x to work.

6 Likes

Looks very cool, will give it a try!

I hope you find it useful! :slight_smile: Please post your thoughts on it here when you’ve tried it.

I just tried the plugin with 6.0.0-rc1 on Ubuntu 18.04. It works flawlessly.
In case of further development:
If scaling and centering could be adjusted by the user, it would be perfect.

2 Likes

I’m happy to hear that it worked under Ubuntu! Thanks for sharing the experience. I’m not sure if scaling and repositioning is possible without a lot of effort, but I’ll give it some thought.

Board2Pdf is now available in KiCad PCM so It could not be easier to install! :slight_smile:

image

6 Likes

i find this plugin on my upper icon panel, but i didn’t find what is it purpose and how to use it. and if i try to search the manual, i find this topic only. would u like prompt me the link to the manual, where to explain more complicative instruction, than in readme file?
i had tried to launch it with default settings and nothing happened , it just coloring layer endless (at least 16minutes, before i interrupted this.)

I experienced this bug myself yesterday. On some computers the plugin hangs on this event. I’ll try to fix the bug asap! On smaller boards it shouldn’t take more than 20 seconds or so for the plugin to output a pdf similar to the samples in my first post in this thread.

I’ll try to find time to write a user manual in the future, but don’t expect it too soon.

I’ll post here when the bug is fixed.

my board is 122x51mm, not big enough.

and if the manual doesn’t exist yet, i can help you to complete it if u just give me some directions, how to use, i will check it by myself, then i will write the detail description of work order.

and my PC OS is win10 64bit

The problem only seems to happen when using a relative path for the Output Directory, such as the default value “.\Board2Pdf”. Try selecting an absolute path by pressing the button with the three dots and see if that works better.

image
I’ve hopefully fixed this issue, and added some error handling so that the plugin shouldn’t hang forever if the files are not found. I have not yet updated the version in the KiCad PCM, but you could try an updated version if you get it directly from the Gitlab repo. https://gitlab.com/dennevi/Board2Pdf/

Thank you for volunteering to write the users manual! That would be very much appreciated! I don’t have any experience in this, but maybe the Wiki function on the Gitlab repo should be used for this.

I’ll try to explain the basics in text. Hopefully you’ll get a hang of it when the plugin starts working for you. :slight_smile:

  • All “templates” in the Enabled Templates list will result in one page each in the exported pdf file.
  • The templates in the Disabled Templates list will do nothing.
  • There’s no limit to how many templates can be enabled.
  • Each enabled template must have at least one layer in the Enabled Layers list, or else the page will be empty.
  • The color of each layer can be selected to any RGB color (without alpha channel).
  • Layers at the top of the Enabled Layers list will be drawn on top of layers further down. I.e. Silkscreen should probably be higher up in the list than Copper layers, so that the silkscreen is drawn on the copper and not vice versa.
  • The “frame” and title block can be printed to one of the layers. This does not have to be a layer which is used for other details, it can also be an empty layer. That way the frame and title block can have a unique color.
  • The “Mirror all layers” checkbox mirrors all layers, but not the frame and title block. Can be useful to plot the bottom side with the texts readable as if the pcb was fliped up side down in your hand.
  • The Output Directory can be chosen by pressing the button with the three dots. It can also be set to a relative path, but then the first first character must be a dot.

The other settings are hopefully self explanatory, but please ask if anything is unclear. It’s hard to put one self in others shoes.

before i repeat ur way with the absolute path, may be i can find the log, what is really happened at the first time? just if u prompt me, where ur plugin has keep it.
in my pc it had created directory board2pdf after 1st launch with the following files.1 2 3

The plugin doesn’t save a log, and it’s not that easy to start the plugin from the python console to get the printouts. I haven’t yet found a good way to do this.

Please update the plugin and try again. I’ve made three commits since the version in the Plugin and Content Manager.

You can download the latest version here: https://gitlab.com/dennevi/Board2Pdf/-/archive/main/Board2Pdf-main.zip

Replace your current files with the files in the folder in the zip archive. If you installed the plugin from the PCM your current version should be installed here: C:\Users\Your username\Documents\KiCad\6.0\3rdparty\plugins\com_gitlab_dennevi_Board2Pdf

the files set in my folder is not the same as in new zip fresh downloaded.


does i need just copy the new files to the folder or i need previously to clear the folder of old files?

You can just copy the new files to the folder, no need to delete the old files.

the ur new edition is working much better, i had launched it with default settings, and it was completed within 5 sec for the 51x122mm board.
but after that i had moved the coloredbottom and coloredtop templates to the enabled templates section, it was pending for a while, at least 15min passed yet.

and i find that in case when operation is completed, the frame was not from PCBNEW settled, but from from EESCHEMA. (the same project).

HOW i can to prompt, from where need to take frame and title block?

but after that i had moved the coloredbottom and coloredtop templates to the enabled templates section, it was pending for a while, at least 15min passed yet.

Strange… I thought these problems were fixed. I’ll try to fix this tonight or tomorrow.

the frame was not from PCBNEW settled, but from from EESCHEMA. (the same project).

That’s interesting! I have no idea… This could be a KiCad bug. I’ll try to reproduce this.

THe PCBNEW view


and the output pdf file
connector board-Assembly.pdf (72.7 KB)
and the original file connector board.kicad_pcb (95.8 KB)

Thanks for posting the files! I’ll see if I can reproduce this. Seems to be a bug in KiCad. If so, I’ll report the bug. There is no way to chose a different frame in the python API, I can only chose to plot the frame or not.

i had checked, this is not took from the EESCHEMA, because the number is properly prompted (the last number is .01), but it took from the gost template the first page title, while in pcbnew was displayed the 2nd page block title.

i think, if u will be improving this, the best way will be on the 1st page frame and title block will be as in your connector board_assembly.pdf file, and on the 2nd and all following pages - the frame and title block as in my screenshot from PCBNEW.