I tried to run inkscape shell mode by writing these lines in a .bat file:
inkscape --shell
>2.svg -e 2.png But it doesn't work at all (no png files), more over I tried to open the current svg input and I found it damaged and I failed to open it at all. Could any one please tell me the right command lines to enter the SHELL mode and开发者_JAVA技巧 execute other inkscape command lines.You're redirecting output, using the >
, to 2.svg. >
means redirect output to this file.
Probably more correct would be:
rem echo the commands you want to execute to a file
echo 2.svg -e 2.png > commands.txt
echo quit >> commands.txt
inkscape --shell < commands.txt
not sure if this works because I don't use windows.
Exporting SVG to different formats
export to bitmap (png)
inkscape -f FILENAME.svg -e FILENAME.png
loads FILENAME.svg and exports it to FILENAME.png
inkscape -f FILENAME.svg -w WIDTH -h HEIGHT -e FILENAME.png
loads FILENAME.svg and exports it to FILENAME.png with width size, WIDTH, and height size, HEIGHT, in pixels
export to pdf
inkscape -f FILENAME.svg -A FILENAME.pdf
loads FILENAME.svg and exports it to FILENAME.pdf
export to ps
inkscape -f FILENAME.svg -P FILENAME.ps
loads FILENAME.svg and exports it to FILENAME.ps
export to eps
inkscape -f FILENAME.svg -E FILENAME.eps
loads FILENAME.svg and exports it to FILENAME.eps
External links:
- Inkscape: Guide to a Vector Drawing Program (online book)
- Chapter 25. Using the Command Line
精彩评论