我试图通过在.bat文件中编写以下行来运行inkscape shell模式:
inkscape --shell
>2.svg -e 2.png
但它根本不起作用(没有png文件),而且我尝试打开当前的svg输入,发现它已经损坏,我无法打开它。
请问有人可以告诉我正确的命令行以进入SHELL模式并执行其他inkscape命令行吗?
我试图通过在.bat文件中编写以下行来运行inkscape shell模式:
inkscape --shell
>2.svg -e 2.png
但它根本不起作用(没有png文件),而且我尝试打开当前的svg输入,发现它已经损坏,我无法打开它。
请问有人可以告诉我正确的命令行以进入SHELL模式并执行其他inkscape命令行吗?
您正在使用>
将输出重定向到2.svg文件中。>
表示将输出重定向到此文件。
更正确的做法可能是:
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
我不确定这是否有效,因为我不使用Windows。
将SVG导出为不同格式
导出为位图(png)
inkscape -f FILENAME.svg -e FILENAME.png
加载FILENAME.svg并将其导出为FILENAME.png
inkscape -f FILENAME.svg -w WIDTH -h HEIGHT -e FILENAME.png
以像素为单位,加载FILENAME.svg并将其导出为WIDTH和HEIGHT大小的FILENAME.png
导出为pdf
inkscape -f FILENAME.svg -A FILENAME.pdf
加载FILENAME.svg并将其导出为FILENAME.pdf
导出为ps
inkscape -f FILENAME.svg -P FILENAME.ps
加载FILENAME.svg并将其导出为FILENAME.ps
导出为eps
inkscape -f FILENAME.svg -E FILENAME.eps
加载FILENAME.svg并将其导出为FILENAME.eps
外部链接: