It's possible to export the contents of an Inkscape SVG file using command line arguments1. For this, we'd need to do something like this:
"C:\Program Files\Inkscape\bin\inkscape.exe" --export-area-page --export-type="png" my-svg-file.svg
This will automatically create and overwrite without asking a my-svg-file.png
. The output filename can be specified with the --export-filename
argument.
We can even use a loop to quickly export all SVG files in the current directory:
for %%f in (.\*.svg) do (
"C:\Program Files\Inkscape\bin\inkscape.exe" --export-area-page --export-type="png" %%f
)
Check Inkscape's wiki for more options.
References
- https://wiki.inkscape.org/wiki/Using_the_Command_Line (accessed 2024-06-04) ↩︎
Leave a Reply