Print references only and merge layers in a single PDF file

I have issues for preparing documentation in Kicad 5.1.10 under Linux.

The Print function allows me to merge some layers but I cannot find a way to exclude either (both) Values or (and) References.

The Plot functions allows me to decide if include Values or References but I cannot find a way to merge some layers, it outputs a separate file for each.

What’s the correct way to do both?
I need a single PDF file with the following information:

  • Edge Cut
  • References (no Values!)
  • Silkscreen Front
  • Fabrication Front
  • Drawings User (I put some mechanical details here)

I really cannot have 5 different files.

As far as I can see this is not possible in v5.1. It’s possible in 5.99 (the unstable development version) by printing and choosing “Print according to objects tab of appearance manager” in the Print dialog and having References but not Values visible in the main view.

Maybe you can get close by printing or plotting to .SVG, and then combine them either with inkscape, or scripting (maybe there is a vector equivalent to imagemagick)

1 Like

If he already gets what he want in PDF whit the PLOT function, then is a bit of post scripting to join all pdfs together, in linux it is quite easy with poppler, pdftk or gs. Merging pdfs

EDIT: In the demo folder of kicad there is an example of how to use the plot function with python (to generate Gerbers, but can be easily changed) “gen_gerber_and_drill_files_board.py”. There is also a python lib to manipulate pdfs https://stackoverflow.com/questions/3444645/merge-pdf-files

EDIT2: From the PyPDF2 webpage:

A Pure-Python library built as a PDF toolkit. It is capable of:
    extracting document information (title, author, …)
    splitting documents page by page
    merging documents page by page
    cropping pages
    merging multiple pages into a single page    <------------- BINGO!
    encrypting and decrypting PDF files
    and more!

https://pypi.org/project/PyPDF2/

They would still be separate pages I think, or do you know that those programs can put them all in the same page and location? Merging PDF docs is a common operation, it can be done also online in many services, but blending the pages would be a niche use case.

Oh, I did not understand that he wanted to layer several PDFs in one page, I though he wanted to stitch several pages together

I don’t really know, but I assume because the Print function in KiCad does that (prints all layers together).

But apparently there is one step that he cannot achieve using the print function, and that is excluding the REFs and VALUES when he prints.

1 Like

While plotting to a .PDF file there are settings to include / exclude footprint values and references:

Well, yes, but now he would like for the plot tool to put all the pages together in one file (still not clear if as layers in one page or as many different pages in one file)

How to get documentation was my first problem to be solved when I started to be interested in KiCad because without it I could’t start to define footprints.
At first I supposed to use Print to get all together. Because I wanted to have one picture with Values and one with References I decided to have Values and References at separate layers (CrtYd and Silk) and decided to not have a Silk at PCB (I place Ref and Val inside the element rectangle). But I wanted to have my outputs in gray scale (to be printed at B&W printer) and it needed to change layer colors before Printing (it was not a problem), but changed colors were remembered even I didn’t saved PCB (and it was a problem).
So I decided to use Plot to SVG and merge several files using inkscape. I could have Val and Ref at the same layer. As I wanted them at documentation with rectangles as CrtYd I moved Val and Ref to CrtYd. But later KiCad’s DRC started to protest against my texts at CrtYd. So I moved them to Fab (in mean time I decided to have Silk at PCB, so I didn’t used Silk for it), and real element dimensions (from Fab) I moved to Eco2. I was happy with it until my contract manufacturer said he wants drawing of what need be protected during wave soldering and I had no free layer so Eco2 was needed for it. I moved Fab pictures back, and Ref and Val to CrtYd and decided to ignore CrtYd checking in DRC.
I hope it will allow you to skip some my steps :slight_smile:

For me it is clear that at one page.
Imagine if you have Edge.Cuts at one page and its dimensions (alone) at second.

I use in my documentation:

  • Edge.Cuts
  • F.Cu (I change it to 10% gray in Inkscape)
  • F.CrtYd
  • References
  • Dwgs.User - some mechanical details (dimensions)

I get this by joining 3 svg files I get from KiCad (References are with CrtYd, Edge.Cuts is included into all files).
The second picture I made with Values instead of references - when I am measuring something at PCB I am not interested if it is R5 or R10 but if it is 100k or 3k3.