Convert SVG to EPS or SVG to PNG with Inkscape on the command line

To use SVG in Overleaf or LaTeX without \usepackage{includesvg} (especially for journals that don’t allow such packages), convert SVG to EPS or PNG as below.

SVG to EPS vector conversion full quality

inkscape -E out.eps in.svg

gives vector graphics conversion at full quality from the command line (no GUI).

Imagemagick doesn’t seem to be able to do this (Imagemagick makes gigantic raster EPS), but Inkscape does the vector SVG to EPS conversion well.

SVG to PNG raster conversion arbitrary quality

You can also convert SVG to PNG (raster) with

inkscape -e out.png in.svg

see man inkscape for more options e.g. to select PNG resolution.

Leave a Comment