Board2Pdf - Export a customized pdf of the board

Hello Albin,

Yes I use v0.5. I don’t see more errors when generating pdf file only the one in the shared screenshot.

The project was located on one of my network drives. I moved I to c:\ to make sure not to have any special characters in the path or filenames. I’m using default settings. Still same error.

Then I was trying with a new project. All was fine. Researched a little further. Turns out it’s a folder/file rights issue that only the generator is aware of somehow. Any… all working fine if the folder/file rights are correct.

Hi Roy,
I’m happy to hear that you got it working!
Sounds a bit strange that the plugin would have problem with folder/file issues if KiCad doesn’t have that problem, but I don’t really know how that stuff works. :slightly_smiling_face:

I get kinda the same error as @neptunus.


The pdfs in the temp directory get created, but are no stiched together. It seems there is a folder/file right issue as @neptunus neptunus mentioned, but i can’t figure it out. I am on Windows btw.

That’s strange. It sounds like PyPDF2 (used by Board2Pdf) is having trouble reading files that KiCad is able to create. I’m not sure why that would be the case.

Is E: a local harddrive or some network location? Is the GettingToBlinky5-F_Cu.pdf file created in the temp folder? If you open it, does it look alright?

You could try copying the project to C: and see if that makes a difference. You could also try shortening the path to see if that helps, i.e. placing the project in E:/temp/ or such.

E: is a local harddrive. The GettingToBlinky5-F_Cu.pdf file is created and it looks alright to me. The Error Message appears for each pdf. I copied the Project to C:/GettingToBlinky5.0 and the same happens.

Is that maybe the issue: python 3.8 - Python3: FileNotFoundError: [Errno 2] No such file or directory: 'FIRST_FILENAME.pdf' - Stack Overflow?

That’s strange. I really thought that would help.

I don’t think so since the file in your error message has the full path specified. Although I’m not sure why there are double backspaces in the path.

What version of KiCad are you using? Which version of Windows? Did you install Board2Pdf using the KiCad PCM? I would really like to be able to reproduce this problem, but I have no idea of how. It shouldn’t be related to the KiCad project.

Thats my KiCad Version Info:

Application: KiCad Schematic Editor (64-bit)

Version: (6.0.1), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.78.0-DEV Schannel zlib/1.2.11

Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Jan 15 2022 13:36:27
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.78.0-DEV
	ngspice: 35
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

I installed Board2Pdf through the KiCad PCM.

Thanks. That’s pretty much identical to my own setup.

@Phozer I did some testing but I’m still not able to reproduce your issues. Everything I try works.

  • Created a Windows user without Administration privileges.
  • Moved the project to a folder on C:
  • Used spaces in the folder name.
  • Changed the output folder in the plugin gui to different folder (absolute path).
  • Replaced the backslash in the output folder path with slash. Also tried double backslashes.

I’m currently all out of ideas.

If you do manage to get it to work, please try to figure out what made it work and post it here. Maybe you could try on a different computer, or with a different Windows user?

Thanks @albin for your effort. I played around a bit and tried with other projects. I am a bit embarrassed and disappointed that the dot . was the problem. All the Projects that worked hadn’t a dot in their name expect the .pdf so i removed the dot and it worked. I assume Board2Pdf or PyPDF2 does not recognize the file extension correct.
I am wondering if you now can reproduce the error with a dot on your filename.

Thank you @Phozer! You have absolutely no reason to be embarrassed! I’m very happy that you managed what I couldn’t, to find out what this issue is! I was indeed able to reproduce the issue.

I now believe that I know what’s going on, and it should be an easy fix. I’ve reported the issue and I’ll fix it within a few days or so.

1 Like

Version 0.6 now released!

I finally took the time to fix a few of the reported issues in Board2Pdf. A new version is now available in the Plugin and Content Manager.

Issues fixed:

  • Generated directory name is troublesome on non-Windows systems (thanks EvilOfLife!)
  • Board2Pdf window is always on top (thanks EvilOfLife!)
  • Board filename cannot contain any dots
  • Generating negative artworks
  • Added “Do not tent Vias Checkbox” for solder mask layers (thanks EvilOfLife!)
  • When output file is in use and cannot be overwritten, this error is not handled correctly

Other improvements:

  • Much improved error reporting for debug purposes.
  • Switched from PyPDF2 to PyPDF4.
  • The title block can now have bitmaps (only if the frame layer is at the bottom of the layers list).
  • Two new template examples with black background (edge cuts layer plotted negative).

More information can be found in the Gitlab repo:
https://gitlab.com/dennevi/Board2Pdf/

2 Likes

Very nice tool! Output looks amazing! Is there any option to disable values or references? Since my fab layer contains values and references they are on top of each other and thus unreadable :frowning:

That is the problem, and you should not blame an external program for that :slight_smile:

What about:

  1. PCB Editor / File / Board Setup / Board Stackup / Board Editor Layers and then rename “User.9” to something like Fab.ekoeck
  2. PCB Editor / Edit Text and Graphics Properties and then move all the value texts from F.Fab to Fab.Ekoeck?

I didn’t want to blame anyone. I was just curious since the integrated plot function has the ability to either plot values, references or both.

I haven’t added that functionality yet, but it’s not very hard if there’s a demand for it. Although I currently have very little time on my hands unfortunately.

If you want you can make a simple hack yourself. If you edit plot.py you have these three lines at around line 247:

# Set General Options:
plot_options.SetPlotValue(True)
plot_options.SetPlotReference(True)

Just change True to False in one or both of these lines and you should get the desired result. If you installed Board2Pdf using the “Plugin and Content Manger” under Windows this file should be located at “My Documents”\KiCad\6.0\3rdparty\plugins\com_gitlab_dennevi_Board2Pdf\

After editing this file you must restart KiCad for it to take effect (if it’s open).

I’m glad you hear that you like the plugin!

Nice, thanks a lot. I managed to add two checkboxes, though I have no idea how to place them correctly. The layout code is beyond me xD If it helps, I will glady send you my edits for review and maybe later integration.

PS: And there seems to be no need to restart KiCAD, closing and opening the board again seems to suffice.

1 Like

Version 0.7 now released!

Improvements:

  • Now creates the output directory if it doesn’t exist already. v0.6 gave a false error message if the directory didn’t exist.
  • The name of the template is now written to the ${SHEETNAME} variable which depending on your drawing sheet may be present in the details in the lower right corner.
  • Layer enable/disable settings are now saved when enabling/disabling layers.

More information can be found in the Gitlab repo:
https://gitlab.com/dennevi/Board2Pdf/

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.