Bug 694088 - "svg" device results SVG syntax errors of the form '...'#000000
Summary: "svg" device results SVG syntax errors of the form '...'#000000
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: 9.07
Hardware: PC Linux
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-21 14:33 UTC by jsmeix
Modified: 2013-05-23 07:31 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
/tmp/hello.ps (123.21 KB, application/postscript)
2013-05-21 14:33 UTC, jsmeix
Details
/tmp/hello.svg as produced by Ghostscript (150.40 KB, text/plain)
2013-05-21 14:34 UTC, jsmeix
Details
My manually fixed /tmp/hello.svg (150.38 KB, text/plain)
2013-05-21 14:35 UTC, jsmeix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jsmeix 2013-05-21 14:33:19 UTC
Created attachment 9728 [details]
/tmp/hello.ps

I made a SVG file using

# echo "Hello" | a2ps -1 -o /tmp/hello.ps
# gs -sDEVICE=svg -sOutputFile=/tmp/hello.svg -dNOPAUSE -dBATCH /tmp/hello.ps

When I try to display /tmp/hello.svg in my Firefox browser,
Firefox cannot display it and shows those syntax errors:

XML Parsing Error: not well-formed
Location: file:///tmp/hello.svg
Line Number 7, Column 18:
<g  stroke='none'#000000>
-----------------^

XML Parsing Error: not well-formed
Location: file:///tmp/hello.svg
Line Number 184, Column 21:
<g  stroke='#f5f5f5'#000000 stroke-width='83.333328'>
--------------------^

XML Parsing Error: not well-formed
Location: file:///tmp/hello.svg
Line Number 187, Column 21:
<g  stroke='#000000'#000000 stroke-width='2.916667'>
--------------------^

I fixed those syntax errors manually one by one and this is the diff:
---------------------------------------------------------------------------
7c7
< <g  stroke='none'#000000>
---
> <g  stroke='none'>
184c184
< <g  stroke='#f5f5f5'#000000 stroke-width='83.333328'>
---
> <g  stroke='#f5f5f5' stroke-width='83.333328'>
187c187
< <g  stroke='#000000'#000000 stroke-width='2.916667'>
---
> <g  stroke='#000000' stroke-width='2.916667'>
---------------------------------------------------------------------------
I.e. I removed the #000000 addendums after the '...'
and now Firefox can display the SVG file.
Comment 1 jsmeix 2013-05-21 14:34:25 UTC
Created attachment 9729 [details]
/tmp/hello.svg as produced by Ghostscript
Comment 2 jsmeix 2013-05-21 14:35:18 UTC
Created attachment 9730 [details]
My manually fixed /tmp/hello.svg
Comment 3 Henry Stiles 2013-05-21 14:51:05 UTC
Ghostscript svgwrite is soon to be deprecated.  All SVG activity (reading, writing) is in development under the MuPDF project.  The enhancement for writing is being tracked here:http://bugs.ghostscript.com/show_bug.cgi?id=694089.
Comment 4 jsmeix 2013-05-23 07:31:46 UTC
Only for the log, this one is a related issue:
http://bugs.ghostscript.com/show_bug.cgi?id=693922