Stefan Steiger
Stefan Steiger

Reputation: 82276

Convert SVG to PDF with GhostScript/GhostPDL?

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

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.

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

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

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

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

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 ?

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

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.

Upvotes: 3

Views: 3892

Answers (1)

KenS
KenS

Reputation: 31199

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.

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.

Upvotes: 4

Related Questions