Hello! I wonder if it is possible to plot schematics to svg from eeschema and simultaneously crop the size to the schematic. I noticed, there is an option plot size as Schematic size in the plot dialog, but it seems to refer to the size, specified in Page settings (used for KiCad 5.1.10 and 5.99 on Windows 10 and Ubuntu 21.04).
If description is confusing: I mean to export as svg with the size of drawn components only (preferably, with some margins). So if I have this schematic:
.SVG are text files, just as KiCad’s own file formats, and human readable.
Just recently I had a look at a PCB file exported to .SVG and it had about 200kB of trailing zero’s added to coordinates.
Have you tried deleting the page frame (or using a very sparse one)?
Another alternative is to save an empty schematic and your own both in .svg formats and compare them with a text file comparison program such as Meld Merge. With this you can probably relatively quickly identify the clutter and remove it without adding extra meta data.
(You can also use it to remove the clutter added by Inkscape)
Or use some other program that can work with .svg, there must be a bunch of them these days.
Euhm,
Have you tried just not plotting the border and title block?
If you make a block selection in KiCad V5, it immediately activates the “Block Move” function. KiCad-nightly V5.99 is more in line with other programs. You can first make a selection by dragging, then add to that selectrion by holding the Shift key, and then “do something” with the selection. I can see some use for Eeschema / File / Plot to have an option to plot the current selection only. Maybe there already is such a request on gitlab. Or if it’s important to you, you can make such a request yourself.
OK, but it seems to be weird because I use the script (see the first post), where the parameter --export-plain-svg supposed to responsible exactly for that.
The other alternative could be that Kicad doesn’t fully honor the svg spec and inkscape does or inkscape produces a more human readable export
We are talking about 2.3kB here, the liberal use of whitespace and/or newline could easily realise this difference
–edit–
I just looked and yes, tonnes of additional formatting and information added, even with plane SVG