Print settings to produce higher-resolution vectors to PDF?

I would like to print from PCBNew to PDF some drawings with various combinations of layers (including User.n layers), in color.

However, I notice that the Print function with Microsoft “Print to PDF” (or Phantom PDF printer driver) as the selected printer causes small text to be rendered with poor resolution vectors. In contrast, the Plot function with PDF output selected produces crisp text, presumably using higher res vectors.

(Side note: I can’t use the Plot function for my purpose because it prints separate layers, and not in color.)



For reference, these are 0603 (1608 metric) resistors. If printed to paper at 1:1, the jaggedness may make little difference, but my intended use for the PDF involves being able to zoom in on details, and possibly print a scaled-up version of the PDF output.

So my question: Is there some combination of settings that can get the print function to produce higher-resolution vector text like the plot output?

I am using Windows 10, recent update, and Kicad 6.0.7.


This does not answer your question, but you may find it interesting/useful regardless: in KiCad 6.99/7 you can plot multiple layers to a single PDF file, in color.

I suppose one workaround for the next couple months (until v7 is released) would be to open your v6 board in v7 and plot there…

KiCad does not Print to files. That is some external function of your printer driver and has nothing to do with KiCad.

KiCad’s Plot to PDF has high accuracy graphics, but it also preserves text strings, so you can search for texts in your PDF.

A printer driver that can redirect output to files should always be the “last resort” option. And therefore I would focus more on:

KiCad can plot the schematic in color, it’s a simple checkbox whether you want B/W or color output:

What do you mean with:

In the bottom right of the screenshot I posted you can choose whether to plot the current page, or all pages.

OP wants to print/plot from the PCB Editor, not the schematic editor. As I understand it the issue is they want multiple PCB layers superimposed on a single output page - the typical output mode for PCB plotting is one layer per page/file, as that’s what’s required for fabrication. I do not think multiple-layers-per-plot is achievable in v6 without merging PDFs in an external tool (I don’t have v6 handy to check) but as mentioned it’s possible in v7.

Thanks for the “not answer” – that does sound like a useful feature to anticipate.

Download 6.99 and try with a copy.
Just make sure you have a backup of your project to continue in 6.0.10 as once opened in 6.99 it will no longer open in 6.0.10
6.99 is totally independent of 6.0.10

EDIT: 6.99 even has its own icon!

I agree with jmk’s approach. I even do this for production boards – I have a separate copy of the git repository where they are stored where I open them with nightly just for using the newer plotting/output functions.

Oops I missed that. I was sidetracked because of the screenshot that looked like a resistor.

.PDF is not a very edit friendly format. I would probably go in the direction of plotting to .SVG files, and then import them in a drawing program such as Inkscape.

It is a resistor, but it’s the fab layer on a footprint rather than the schematic symbol :slight_smile:

That’s a good suggestion.

I imagine something like imagemagick could do the superposition given the right arguments, even with PDFs, but figuring out the right arguments is its own problem.

I had a short look at:

because I thought ImageMagick only used pixel formats, but apparently it can do something with .SVG too, and it then uses Inkscape in the background. Which leads to: Using the Command Line - Inkscape Wiki . Apparently Inkscape has quite a lot of command line options, and it seems plausible that combining .SVG’s (and then possibly export to a single .PFG) can be done via the command line or scripted.

My plugin Board2Pdf does exactly this. It’s available in the PCM for easy installation.

You can find two example pdf files in the readme here:

@albin That certainly looks like an interesting project. But… there’s always a “but” …

The next problem I need to address is how to make actual paper printouts tractable, with text large enough to read.

The workflow needs to include PDFs that would be later printed as needed.

That quest seems to involve some means to specify a rectangle smaller than the frame (possibly just all content on selected layers with frame turned off), and then, ideally, persuading Kicad (or plugin) to scale that to fit page and save/print that to PDF.

Current fallback is to get Kicad to print the selected and frameless content to PDF, which results in a large white border. (The boards I deal with are considerably smaller than a page.)

Then load that into PDF editing software, crop it, then print-to-PDF (or PDF printer driver) with “fit to page” option.

(I guess including or excluding the frame in the Kicad output makes no difference when applying manual crop that includes just the board, but I’m hoping to find a “crop to content” function in the PDF software, which would depend on the frame being absent.)

But this manual cropping and fiddling is not at all optimal – I want automation of the process all the way from Kicad to the desirably scaled finished PDFs.

So I eagerly looked at whether your project solved that problem (ie: primarily scaling to fit page size)… and sadly I see in the issues that it’s a requested feature, but that you ran into obstacles tackling it.

So, more head-scratching required!

Yes, this has been requested a few times. I don’t have such need myself, and therefor I haven’t prioritized adding this feature.

My guess is that scaling can be hard to solve, but cropping shouldn’t be that hard. If the pdf file is cropped correctly, it should be easy to print it to a full page with just about any pdf reader.

I will try to find time to implement cropping.

Board2Pdf currently uses PyMuPdf. It supports setting a cropbox. Only hard thing to solve is to automatically calculating the coordinates of the cropbox.

It may also be possible using a tool called pdfCropMargins.

Until this feature is developed, it seems like pdfCropMargins can save you a lot of trouble. It seems to be avaiable both as command line and as a GUI application.

1 Like

pdfCropMargins does indeed look very worthwhile to know about, and not just for my immediate tasks. Thanks for pointing it out!

I generate multi-layer pdfs, including user layers (6.0.9, 6.0.10 on linux; dunno about v5). It is an easy selection of check boxes and then print-to-file. Resolution is not a problem:

It is gerber/exc for fab of course, but I like to have a pdf of each copper layer, silk, and fab, but I also have user layers with other data. I also find a top-plus-bottom layer handy at times when I want to follow a signal as I am working on a board, so there are various use cases for multi-layer output. I have never used plot, only output to pdf.

Thanks @teletypeguy, but I’m not following:

It is gerber/exc for fab of course,

What “it” are you describing? I can’t tell whether you are saying that the images are of course the gerber output for fab (that you have found a way to combine into a single image)? Or are you saying “of course you use gerber output for fab, but that’s a topic unrelated to the matter at hand”? (And later you say you never use the plot function, so I don’t know how you would produce gerbers.)

but I like to have a pdf of each copper layer, silk, and fab,
but I also have user layers with other data.

OK, not sure what this bears upon, but for what it’s worth, yes, we all like multiple layers. The embellishment beyond that for the topic at hand is multiple layers overlayed with one another for the PDF printout, which I think is what your images show, unless that’s a screen cap of PCBNew.

there are various use cases for multi-layer output.

Agreed. But back to the main point of interest:

Supposing the images you show are what I’m trying to achieve (multiple layers to PDF with good-resolution vector text), then how did you achieve it so that I might try that same method? Specifically:

  • What Kicad command or button did you use?
  • … leading to what dialog (title of dialog)?
  • and what options did you select (“easy selection of checkboxes”)?
  • and in which dialog is the “print to file” option that you mention?
  • how did you select for “pdf” to be the format for the data “printed to file”?


gwideman: pardon the brevity – I did not explain that well. Yes, I meant that the gerber and excellon are the master outputs, generated with the normal File/Fabrication-Outputs/Gerbers and click Generate-Drill-Files and Plot (so, yeah I guess I do use plot, but not for pdf, as you did). Did it like this:

I am currently running kicad 6.0.10 on pop-os linux 22.04 LTS.
I like to also save pdfs of my fab layers, plus a few multiple-layer pdfs. The pics above are of a pdf I printed from the pcb editor. I opened it into inkscape to magnify it. Generated the pdf from File/Print like this:

Scale to x1.5 just to be bigger on the printer, but I believe any scale would be a decent resolution. Here it is blown up to where the resolution is noticeable:

and forgot to show the last dialog, where the pdf file output occurs. As @ paulvdh pointed out, it is the os that provides a “printer driver” that saves to pdf, and this is it on pop-os:

1 Like

Thanks very much for the elaboration.

So your process uses Kicad’s Print (not Plot) feature, and then in your version of Linux the Print-to-file → output format PDF negotiates a higher resolution PDF file than my parallel process does on Windows.

On Windows (10) the Print dialog does have “Print to File” but doesn’t intrinsically know about PDF per se, only offering you a list of “printers”, where one or more may be for PDF output (eg: Microsoft Print To PDF, or, in my case, also Foxit Phantom PDF printer). Evidently the ensuing negotiation produces lower-resolution results.

Glad we got to the bottom of that!