xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gisbert van Rossum" <gvros...@springsite.com>
Subject Nullpointer Exception when using units in <svg:use>
Date Tue, 05 Aug 2003 09:36:48 GMT
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="..." />.

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

Mime
View raw message