Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3553

Re: PostScript to SVG

From news@zzo38computer.org.invalid
Newsgroups comp.lang.postscript
Subject Re: PostScript to SVG
Date 2020-07-06 15:56 -0700
Organization Aioe.org NNTP Server
Message-ID <1594070675.bystand@zzo38computer.org> (permalink)
References <80bb8877-f7f9-4c4e-b3ea-c454dab4aa40o@googlegroups.com> <1593895164.bystand@zzo38computer.org> <MPG.396d44e27956d98b9898b8@usenet.plus.net>

Show all headers | View raw


ken <ken@spamcop.net> wrote:
> In article <1593895164.bystand@zzo38computer.org>, 
> news@zzo38computer.org.invalid says...
>  
> > I first produced PDF output, and then used a program called "pdf2svg",
> > although better might be making a SVG output driver for Ghostscript. (I
> > think there might be one but doesn't fully work, or something like that.
> 
> There *was* an SVG output device and at one time an SVG interpreter, 
> both were declared defunct and removed from the source tree on the 9th 
> March 2014.

OK, the SVG output device is discussed below, but the SVG interpreter, I
did also think of the possibility to write a SVG reader in PostScript, if
there is a XML parser in PostScript.

(I also don't like how the "run" operator reads PDF and EPS files as well
as PostScript programs; I would think that it would be better to have a
separate operator, perhaps called "rundoc", to do such thing (it would
still interpret it as a normal PostScript file if it is not recognized as
PDF or EPS, though). I think a EPS file is a PostScript program, anyways.
An alternative would be for the PostScript only run operator to be called
".run" and to leave "run" like it is; if you use -dWRITESYSTEMDICT then
you can write "/run /.run load def" if you want to disable PDF.)

> Essentially the problem was that fonts are not well supported in SVG and 
> many SVG consumers (at least back then) didn't really support fonts in 
> SVG at all.

You could have the option to output text as paths, perhaps (either for
some fonts or for all fonts, I suppose).

> I expect the device still works so you could probably get the source for 
> Ghostscript 9.10, take  the gdevsvg.c file from ghostpdl/devices/vector, 
> and then modify the makefile of the current code to build and include 
> the device.

There is the possibility of dynamically loading drivers, at least on
Linux. Unfortunately this seems to be undocumented except for the option
for the configure script. On my computer, it expects the dynamic driver
files in the directory called "/usr/local/lib/ghostscript/9.52"; if a
dynamic driver is compiled and put in that directory, it will be loaded.
(I have used this feature and intend to use some more, such as to
implement a driver for my "separations output format", although users who
don't have this feature can just recompile Ghostscript if they want to
add drivers, I suppose.)

I have not looked at the SVG output driver, although I will do so, to see
if it is suitable for my uses, at least. Then, someone else can see
whether or not it is suitable for their uses (and, I suppose, correct any
problems in that driver if they can do so).

> The pdfmark PostScript operator is only supported by the pdfwrite 
> device.

While that may be the only included device which does, it would seem that
it is implemented as a device parameter, so it is possible to implement
other drivers that do that by checking for the /pdfmark device parameter.
(A test I have made seems to confirm that.)

Also, I think I read the DjVu output driver supports some pdfmarks too.
(Although I suppose that there may be possibility that some output formats
may support some pdfmarks that PDF doesn't, although probably not.)

-- 
This signature intentionally left blank.
(But if it has these words, then actually it isn't blank, isn't it?)

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

PostScript to SVG jdaw1 <jdawiseman@gmail.com> - 2020-07-04 05:53 -0700
  Re: PostScript to SVG news@zzo38computer.org.invalid - 2020-07-04 14:07 -0700
    Re: PostScript to SVG ken <ken@spamcop.net> - 2020-07-06 15:26 +0100
      Re: PostScript to SVG news@zzo38computer.org.invalid - 2020-07-06 15:56 -0700
        Re: PostScript to SVG ken <ken@spamcop.net> - 2020-07-07 08:03 +0100
  Re: PostScript to SVG Jean-Francois Moine <moinejf@free.fr> - 2020-07-11 16:36 +0200
  Re: PostScript to SVG jdaw1 <jdawiseman@gmail.com> - 2020-07-12 03:19 -0700
  Re: PostScript to SVG luser droog <luser.droog@gmail.com> - 2020-07-29 00:22 -0700
    Re: PostScript to SVG luser droog <luser.droog@gmail.com> - 2021-08-27 19:47 -0700
      Re: PostScript to SVG jdaw1 <jdawiseman@gmail.com> - 2021-10-10 11:46 -0700

csiph-web