PCB_PrintOptions parameters

  • color_theme : [string] (default: '_builtin_classic') Selects the color theme. Only applies to KiCad 6. To use the KiCad 6 default colors select _builtin_default.
    Usually user colors are stored as user, but you can give it another name.

  • force_edge_cuts : [boolean] (default: false) Add the Edge.Cuts to all the pages.

  • format : [string] (default: 'PDF') (choices: “PDF”, “SVG”, “PNG”, “EPS”, “PS”) Format for the output file/s. Note that for PS you need ghostscript which isn’t part of the default docker images.

  • output : [string] (default: '%f-%i%I%v.%x') Filename for the output (%i=assembly, %x=pdf/ps)/(%i=assembly_page_NN, %x=svg/png/eps). Consult the page_number_as_extension and page_id options. Affected by global options.

  • output_name : Alias for output.

  • pages : [PagesOptions parameters] [list(dict)] (default: []) List of pages to include in the output document. Each page contains one or more layers of the PCB.

  • plot_sheet_reference : [boolean] (default: true) Include the title-block (worksheet, frame, etc.).

  • scaling : [number] (default: 1.0) Default scale factor (0 means autoscaling).

  • add_background : [boolean] (default: false) Add a background to the pages, see background_color.

  • autoscale_margin_x : [number] (default: 0) Default horizontal margin used for the autoscaling mode [mm].

  • autoscale_margin_y : [number] (default: 0) Default vertical margin used for the autoscaling mode [mm].

  • background_color : [string] (default: '#FFFFFF') Color for the background when add_background is enabled.

  • background_image : [string] (default: '') Background image, must be an SVG, only when add_background is enabled.

  • blind_via_color : [string] (default: '') Color used for blind/buried colored_vias.

  • buried_via_color : [string] (default: '') Color used for buried colored_vias (KiCad 10+).

  • colored_pads : [boolean] (default: true) Plot through-hole in a different color. Like KiCad GUI does.

  • colored_vias : [boolean] (default: true) Plot vias in a different color. Like KiCad GUI does.

  • dnf_filter : [string | list(string)] (default: '_null') Name of the filter to mark components as not fitted. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • dpi : [number] (default: 360) (range: 36 to 1200) Resolution (Dots Per Inch) for the output file. Most objects are vectors, but thing like the the solder mask are handled as images by the conversion tools.

  • drill : [DrillOptions parameters] [boolean | dict] (default: false) Use a boolean for simple cases or fine-tune its behavior. Used to customize the drill_pairs option to print drill maps.

  • drill_marks : [string] (default: 'full') (choices: “none”, “small”, “full”) What to use to indicate the drill places, can be none, small or full (for real scale).

  • exclude_filter : [string | list(string)] (default: '_null') Name of the filter to exclude components from processing. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • forced_edge_cuts_color : [string] (default: '') Color used for the force_edge_cuts option.

  • forced_edge_cuts_use_for_center : [boolean] (default: true) Used when enabling the force_edge_cuts, in this case this is the use_for_center option of the forced layer.

  • frame_plot_mechanism : [string] (default: 'internal') (choices: “gui”, “internal”, “plot”) Plotting the frame from Python is problematic. This option selects a workaround strategy.
    gui: uses KiCad GUI to do it. Is slow but you get the correct frame.
    But it can’t keep track of page numbers.
    internal: KiBot loads the .kicad_wks and does the drawing work.
    Best option, but some details are different from what the GUI generates.
    plot: uses KiCad Python API. Not available for KiCad 5.
    You get the default frame and some substitutions doesn’t work.

  • hide_excluded : [boolean] (default: false) Hide components in the Fab layer that are marked as excluded by a variant. Affected by global options.

  • include_table : [IncludeTableOptions parameters] [boolean | dict] (default: false) Use a boolean for simple cases or fine-tune its behavior. When enabled we include tables using the same mechanism used in the include_table preflight. The result isn’t saved to disk.

  • individual_page_scaling : [boolean] (default: true) Tell KiCad to apply the scaling for each page as a separated entity. Disabling it the pages are coherent and can be superposed.

  • invert_use_for_center : [boolean] (default: false) Invert the meaning of the use_for_center layer option. This can be used to just select the edge cuts for centering, in this case enable this option and disable the use_for_center option of the edge cuts layer.

  • keep_temporal_files : [boolean] (default: false) Store the temporal page and layer files in the output dir and don’t delete them.

  • micro_via_color : [string] (default: '') Color used for micro colored_vias.

  • pad_color : [string] (default: '') Color used for colored_pads.

  • page_number_as_extension : [boolean] (default: false) When enabled the %i is always assembly, the %x will be NN.FORMAT (i.e. 01.png). Note: page numbers can be customized using the page_id option for each page.

  • png_width : [number] (default: 1280) (range: 0 to 7680) Width of the PNG in pixels. Use 0 to use as many pixels as the DPI needs for the page size.

  • pre_transform : [string | list(string)] (default: '_null') Name of the filter to transform fields before applying other filters. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • realistic_solder_mask : [boolean] (default: true) Try to draw the solder mask as a real solder mask, not the negative used for fabrication. In order to get a good looking select a color with transparency, i.e. ‘#14332440’.
    PcbDraw must be installed in order to use this option.

  • sheet_reference_layout : [string] (default: '') Worksheet file (.kicad_wks) to use. Leave empty to use the one specified in the project.

Warning

you must provide a project.

  • svg_precision : [number] (default: 4) (range: 0 to 6) Scale factor used to represent 1 mm in the SVG (KiCad 6). The value is how much zeros has the multiplier (1 mm = 10 power svg_precision units).
    Note that for an A4 paper Firefox 91 and Chrome 105 can’t handle more than 5.

  • title : [string] (default: '') Text used to replace the sheet title. %VALUE expansions are allowed. If it starts with + the text is concatenated.

  • variant : [string] (default: '') Board variant to apply.

  • via_color : [string] (default: '') Color used for through-hole colored_vias.

Used dicts