Resize Schematic SVG Export using CLI 7.0

As the title states, I would like to scale the SVG export from the CLI. I noticed that there is limited scaling (change page size) when plotting an SVG from the dialog in the schematic editor.

Das verstehe ich nicht (und die anderen anscheinend auch nicht).

Was meinst du mit Skalieren? SVG ist beim betrachten Skalierbar (Darum hat es ein S in SVG). Darum verstehe ich das Ziel nicht.

Eventuell könntest du die Zeile 9 im SVG ändern. Meinst du das?

Does the SVG export have a defined width and height, which prevents it from scaling? It should only have a viewBox.

Do you have a sample SVG I could look at?

Thanks for the response. To be clear, the resulting SVG is “scalable.” What I want is a switch in CLI to specify the scale. If I create an SVG from within the dialog in eeschema, I can scale the SVG (but there are only 3 settings). For example, here are two SVG files created from the dialog. Note the difference in width, height and viewBox. However, instead of just settings for particular page sizes, I want to ability to change to any size.

The reason for this request is that I want to have the SVG fit full width in a document without the need for any operations after CLI.

a_size
default

Sure, it just needs to change from

width=“279.4000mm” height=“215.9000mm” viewBox=“0.0000 0.0000 279.4000 215.9000”

to

viewBox=“0.0000 0.0000 279.4000 215.9000”

and will then scale to fit wherever it is put.

I’ve surmised that kicad-cli cannot scale the svg, so I enhanced my python script to do it for me. In case anyone is interested, here is the script.

kicad2svg.py (3.8 KB)

I guess that will do it, too. Instead of making it scalable you make it a (different) fixed size. The width and height attributes are optional, and mostly not needed.

Please write in English. It’s not convenient for everyone else who doesn’t know German.