xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinkar Ganti" <dink...@lifeconnect.com>
Subject RE: Adobe SVGViewer says: bad CSS property or descriptor declaration
Date Tue, 14 Aug 2001 17:18:56 GMT
Hi,

In the svg file: is the width and height set to a very large value? If is it
so, then please add the following to the Java code:

      SVGGraphics2D svggr2d = new SVGGraphics2D(document);
	svggr2d.setSVGCanvasSize(new Dimension(1000,1000));

This might work.

Hope this helps,

Dinkar
-----Original Message-----
From: Randall Parker [mailto:randall2@nls.net]
Sent: Monday, August 13, 2001 3:14 PM
To: Batik Users
Subject: Adobe SVGViewer says: bad CSS property or descriptor
declaration


Has anyone else downloaded the Adobe SVGViewer and tried it as a browser
plug-in to view SVG
files generated by Batik SVGGraphics2D class? I can view the files with the
Batik SVG Browser but
not with the Adobe SVGViewer.

If you don't already have the Adobe SVGViewer plug-in and are running
Windows or Mac you can
download it here:
   http://www.adobe.com/svg/viewer/install/main.html

I'm using it in IE5.5 SP1 on NT4 SP6a.

First of all, if you do this you absolutely have to set the character
encoding. Adobe SVG Viewer will
complain about an unrecognized encoding on the first line if you don't set
it.

So this results in an error:
   <?xml version="1.0" encoding="cp1252"?>
whereas this is accepted:
   <?xml version="1.0" encoding="UTF-8"?>

This is what I do to generate a document. The line for the
MakerObj.doGenToGr2D() method call is a
call to a graphics lib that does a lot of Graphics2D calls to fill in the
document I'm generating.

      org.w3c.dom.DOMImplementation domImpl =

org.apache.batik.dom.GenericDOMImplementation.getDOMImplementation();
      org.w3c.dom.Document document =
domImpl.createDocument(null,"svg",null);
      SVGGraphics2D svggr2d = new SVGGraphics2D(document);

      MakerObj.doGenToGr2D(svggr2d,0,0,DrawingWidth,DrawingHeight);

      try
      {
        java.io.FileOutputStream SvgOut = new
java.io.FileOutputStream("\\tmp\\svgout.svg");
        boolean useCSS = true; // we want to use CSS style attribute
        java.io.Writer StreamOut = new java.io.OutputStreamWriter(SvgOut,
"UTF-8");
        svggr2d.stream(StreamOut, useCSS);
        SvgOut.close();
      }

However, now that I've fixed that problem I'm seeing this message:
   bad CSS property or descriptor declaration
 You can see that message at the bottom of IE if you place your mouse over
the blank white page
window.

Before I go trying to isolate this to a particular line in the SVG file does
anyone know whether
Adobe's SVGViewer is at a different standards level for the SVG spec? Or is
there some other
reason not to expect it not to work?





---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message