You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Keiron Liddle <ke...@aftexsw.com> on 2001/06/21 08:55:28 UTC
transcoder problem
I get the following stack trace when converting the attached svg file.
This happens when using the transcoder (in this case the pdf but it also
occurs with the png).
The error occurs with the current cvs but works ok with batik 1.0.
DOes anyone know what the problem might be?
java.lang.NullPointerException
at org.apache.batik.gvt.text.GlyphLayout.doExplicitGlyphLayout(GlyphLayout.java:953)
at org.apache.batik.gvt.text.GlyphLayout.<init>(GlyphLayout.java:93)
at org.apache.batik.gvt.text.ConcreteTextLayoutFactory.createTextLayout(ConcreteTextLayoutFactory.java:36)
at org.apache.batik.gvt.renderer.StrokingTextPainter.getTextChunk(StrokingTextPainter.java:302) at
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(StrokingTextPainter.java:141)
at org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(StrokingTextPainter.java:683)
at org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds(StrokingTextPainter.java:657)
at org.apache.batik.gvt.renderer.BasicTextPainter.getPaintedBounds(BasicTextPainter.java:145)
at org.apache.batik.gvt.TextNode.getPrimitiveBounds(TextNode.java:160)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(AbstractGraphicsNode.java:815)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:789)
at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(CompositeGraphicsNode.java:326)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:789)
at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:278)
at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(AbstractGraphicsNode.java:858)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:366)
at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:261)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:126)
at org.apache.batik.apps.rasterizer.Main.writeImage(Main.java:45)
at org.apache.batik.apps.rasterizer.Main.main(Main.java:200)
GlyphLayou Problem (was: transcoder problem)
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "KL" == Keiron Liddle <ke...@aftexsw.com> writes:
KL> I get the following stack trace when converting the attached svg
KL> file. This happens when using the transcoder (in this case the
KL> pdf but it also occurs with the png). The error occurs with the
KL> current cvs but works ok with batik 1.0.
KL> DOes anyone know what the problem might be?
KL> java.lang.NullPointerException at
KL> org.apache.batik.gvt.text.GlyphLayout.doExplicitGlyphLayout(GlyphLayout.java:953)
KL> at
KL> org.apache.batik.gvt.text.GlyphLayout.<init>(GlyphLayout.java:93)
KL> at
I don't know the root cause, I hacked the following to get around
it temporarily, however I am 100% _POSITIVE_ this isn't the correct
solution, that will have to wait for the Bella and/or Dean to wake up :)
Has anyone else noticed a marked increase in memory usage when
dealing with text?
Index: sources/org/apache/batik/gvt/text/GlyphLayout.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/text/GlyphLayout.java,v
retrieving revision 1.15
diff -r1.15 GlyphLayout.java
953,954c953,957
< glyphOrientationAngle = (int)((Float)aci.getAttribute(GVTAttributedCharacterIterator.
< TextAttribute.VERTICAL_ORIENTATION_ANGLE)).floatValue();
---
> Float angle = (Float)aci.getAttribute
> (GVTAttributedCharacterIterator.
> TextAttribute.VERTICAL_ORIENTATION_ANGLE);
> if (angle != null)
> glyphOrientationAngle = (int)(angle.floatValue());
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org