如何使用 inkscape 从 pdf 命令行提取 svg



是否有命令行选项可以要求 inkscape 从 pdf 页面 3 中提取 svg(例如)?我现在使用的命令是

$ inkscape -f test.pdf -l test.svg

但我还想要从此 pdf 导出特定页面的选项。

首先使用 pdftk(或实际上,任何其他合适的工具)提取您需要的页面怎么样:

mypage=$(mktemp -u XXXXXX.pdf)
pdftk test.pdf cat 3 output "$mypage"
inkscape -l test.svg "$mypage"
rm "$mypage"

(能够将输出从pdftk直接传输到inkscape会很好。不幸的是,当从stdin提供时,inkscape期望数据是svg。命名管道也无济于事,因为inkscape似乎尝试多次遍历 pdf 文件。

最新更新