Inkscape in Windows Command Line
Inkscape is a great tool to draw excellent pictures, and is open source. Although it has some problems when working in Windows, nevertheless there are plenty solutions.
One of those problems is the command line. In Windows the command line doesn’t give any output because everything is redirected to the
stderr. In the documentation they mention that they are working on it, but there are some solutions already. Is just about wrap Inkscape to other software.
Now that we can see the output when we try to work in batches or simple files you will notice that Inkscape does not produce any results or give some error about the files do not exist. That is because it uses the path of where is installed and not the current directory. To solve this -- and avoid writing the full path all the time -- we can use the
%CD% windows variable which holds the current directory full path. For example to convert the
figure.png to eps we will input
inkscape -f "%CD%\figure.png" -E "%CD%\figure.eps"
inkscape command could be replaced by the command that you use once the Inkscape executable is wrapped to show output, the
-f option sets the input file, and the
-E option is for set the export as eps file. Note that the
%CD% option uses an aditional backslash ('\') at the end to create a correct path for the files.