mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
310 stars 34 forks source link

Ghostscript 10.01.0+ support #254

Closed ryandesign closed 1 year ago

ryandesign commented 1 year ago

With dvisvgm 3.1.2, when ghostscript 10.02.0 is installed, dvisvgm --pdf somefile.pdf produces this error:

ERROR: To process PDF files, either Ghostscript < 10.01.0 or mutool is required.
The installed Ghostscript version 10.02.0 isn't supported.

This was originally reported to MacPorts by @OverflowCat.

muzimuzhi commented 1 year ago

Starting with 10.01.0, Ghostscript removed its (long-existing PostScript-based) pdf interpreter, hence dvisvgm had to choose another tool, mutool.

See dvisvgm v3.0 release notes and its manpage (https://dvisvgm.de/Manpage/).

ryandesign commented 1 year ago

So it is not possible for dvisvgm to be rewritten to use Ghostscript 10.01.0+'s new PDF interpreter? Or do you mean Ghostscript 10.01.0+ no longer offers any PDF interpreter?

mgieseki commented 1 year ago

Ghostscript replaced its PostScript-based PDF interpreter with a completely new one written in C. Unfortunately, it doesn't provide means to override the PDF operators which was possible before. Thus, dvisvgm can no longer properly interact with the PDF interpreter. I currently don't see a way to utilize the new Ghostscript releases for dvisvgm's PDF conversion functionality.

ryandesign commented 1 year ago

Ok thanks for the explanation. It's a shame that Ghostscript removed a feature you were relying on.

muzimuzhi commented 1 year ago

See also #226.

mgieseki commented 1 year ago

Just a short addition: Ghostscript is still required for dvisvgm's PostScript functionality, i.e. processing of PS specials or the conversion of PS/EPS files. So, mutool doesn't replace Ghostscript completely. It's only required for handling PDF stuff.