How do you crop all empty space from an SVG file, either from the command line or Python?
I have several SVG files formatted to the standard A2 letter document size, yet are mostly empty, and I need to bulk crop them down so their view box is the same as the minimum bounding box for their contents.
I can do this in Inkscape using the "Resize Page to Selection" option, but I don't see any way to access this function from the command-line. I thought it might be a call like:
inkscape -z --verb=FitCanvasToDrawing --verb=FileSave --verb=FileClose file.svg
as suggested here but that has no effect.