xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Nullpointer Exception when using units in <svg:use>
Date Wed, 06 Aug 2003 00:48:08 GMT
Hi Gisbert,

Gisbert van Rossum wrote:
> Hi there!
> 
> I'm trying to render the attached file using FOP 0.20.5 (which uses
> Batik 1.5beta4 as they say).
> This file contains a <svg:use x="50%" y="50%" xlink:href="..." />.

   Every SVG fragment must have an 'svg' element to define the
SVG viewport.  99% cetain This is your problem.

> 
> when executing FOP with:
> 
> fop svgUse.fo test.pdf
> 
> I get the following NullpointerException:
> 
> [ERROR] svg graphic could not be built: null
> java.lang.NullPointerException
>         at
> org.apache.batik.bridge.UnitProcessor$DefaultContext.getViewportWidth(Un
> itProcessor.java:382)
>         at
> org.apache.batik.util.UnitProcessor.percentagesToPixels(UnitProcessor.ja
> va:223)
>         at
> org.apache.batik.util.UnitProcessor.svgToUserSpace(UnitProcessor.java:16
> 6)
>         at
> org.apache.batik.util.UnitProcessor.svgToUserSpace(UnitProcessor.java:13
> 1)
>         [... see attachment for full stacktrace ...]
> 
> Viewing the SVG in Batik-Squiggle however works perfectly! The Batik
> source UnitProcessor.java doesn't contain a line number 382, apparently
> the beta version code of this class differs from the final 1.5 version.
> 
> When I remove the '%' from the positioning attributes x and y of
> svg:use, there is no problem.
> The smae problem exists when I use 'cm' instead of '%'
> 
> Can you tell me what I am doing wrong, or how to fix this problem?
> 
> My platform is Win2k, j2sdk1.4.0.
> 
> btw: I submitted a bug report in Bugzilla
> (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21846). I'm afraid I
> did this too soon. Sorry about that.
> 
> thanx & greetings,
> Gis van Rossum
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> 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