Currently I can find a python interface to plot individual PCB layers to PDF with one PDF per layer. If I try to plot multiple layers to a single PDF this does not work. Now this is expected as even the plot GUI does not have a method to plot multiple layers to a single PDF.
My question is then, how can the Print interface be used to generate a single PDF with multiple layers? Looking at the print dialog window this can be done but I can’t seem to find this ability within the python API. Is the ability there?
What you mention is the “Plot” interface, not the “Print” interface. Plot allows generation of a Gerber/PDF/DXF of a single layer.
The python example that you reference also showcases the “Plot” interface. As you will see, if one was to use multiple SetLayer(), only the most recent layer that that was called with will hbe plotted.
What I am after is having a document that has multiple layers in a single image, for example edge cuts, dimension, and silkscreen.
That is the method that I currently use, export all layers as SVG without frame, then have python call a post process step to merge all into a single image. A roundabout way but does kind of work as needed.
Ideal would be to not have to do additional post processing and just use the KiCAD scripting interface directly.