使用GhostScript/GhostPDL将SVG转换为PDF? [英] Convert SVG to PDF with GhostScript/GhostPDL?

查看:551
本文介绍了使用GhostScript/GhostPDL将SVG转换为PDF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:
可以使用GhostPCL将SVG转换为PDF,如下所示:

Question:
It is possible to convert SVG to PDF using GhostPCL, like this:

gsvg.exe -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=my.pdf t1.svg

困难在于获取gsvg.exe ...
我设法从以下位置找到来源:
http://svn.ghostscript.com/ghostscript/trunk/
并且它可以构建和编译,并且运行良好.

The difficulty is getting gsvg.exe...
I managed to find the source from:
http://svn.ghostscript.com/ghostscript/trunk/
and it built and compiled and it works fine.

但是,当我访问 http://svn.ghostscript.com 时,它会指出:

However, when I go to http://svn.ghostscript.com, then it states:

不推荐使用SVN,现在托管Ghostscript和相关项目 仅在git存储库中,请参见: http://git.ghostscript.com

SVN is decprecated, Ghostscript and associated projects are now hosted only in git repositories, see: http://git.ghostscript.com

所以我试图通过从git存储库下载来获取最新版本

So I tried to get the latest version by downloading from the git repository

git clone http://git.ghostscript.com/ghostpdl.git

它构建良好,但是gsvg似乎消失了.
不幸的是,它在文档部门缺少一点.
有人知道此功能是否已集成,删除或以其他方式移动了吗?

It built fine, but it looks like gsvg is gone.
Unfortunately, it lacks a bit in the documentation department.
Does anybody know if this functionality has been integrated, deleted, or otherwise moved ?

如果已集成,如何在新版本中(使用ghost *)将svg转换为pdf?

If it has been integrated, how can I convert a svg to a pdf in the new version (using ghost*) ?

PS:
是的,我知道我可以使用inkscape或rsvg-convert来做到这一点,但是它们不适用于我的SVG(rsvg-convert会删除所有文本),inkscape的svg转换质量较差. CairoSVG似乎与rsvg-convert相同.
只有ghostsvg可以按要求工作.

PS:
Yes, I know I can do it with inkscape or rsvg-convert, but they don't work fine for my SVGs (rsvg-convert removes all text), inkscape delivers poor quality svg conversion. CairoSVG seems to be the same as rsvg-convert.
Only ghostsvg works as required.

推荐答案

SVG输入(gsvg)已被弃用,并已从Ghostscript中删除.它从来没有运行良好,也没有足够的兴趣来更新和维护它.

SVG input (gsvg) has been deprecated and removed from Ghostscript. It never worked well and there was not sufficient interest to bring it up to date and maintain it.

如果您真的很绝望,则可以使用gsvg源并将其与当前的图形库和输出设备粘合在一起,Ghostscript API并未发生任何变化,因此应该"仍然可以使用,但是目录结构可以进行了重做,并修改了makefile以使其匹配,因此它并不简单.

If you're really desperate you can probably take the gsvg sources and glue them together with the current graphics library and output devices, nothing has changed in the Ghostscript API so this 'should' all still work, but the directory structure has been reworked and the makefiles modified to match, so its not going to be simple.

这篇关于使用GhostScript/GhostPDL将SVG转换为PDF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆