Keiron Liddle wrote:

This sounds great, but I have one question. We've posted a bug report
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16672) about the SVG rendering in 0.20.4 and 0.20.5. Our SVG's in the rendered PDF document(s) gets clipped. We're now using 0.20.1 and everything is fine there. The PS renderer in 0.20.4 and 0.20.5 also produces a correct rendered SVG. We use FOP at the Swedish Election Authority and consider this to be a big blocker for us, and I assume that's the case for others as well. I haven't seen any activity in this list etc on this bug report and wouldn't it be nice to dig in to this before the final release.


Take a look at line 526 of PDFRenderer.java, it clips to the size of the SVG image.
Is it possible that part of the SVG goes outside the SVG width and height?

Try commenting it out or changing the size of your SVG and seeing if it changes.


I'll happily provide the SVG file, XSL etc if this could help. I've been trying to look at the code myself but I'm not really confident with the design and the PDF spec.

By the way, thank you for an awesome product ...

Christer
This is our SVG width and height:

<svg width="252.836" height="52.828" ...

When I added some println() statements to PDFRenderer, both in 0.20.1 and 0.20.4, this i what I got.

0.20.1: w = 252836, h = 52828
0.20.4: w = 252000, h = 52000

The difference between those two, to me, seems to be the way you fetch the SVG size. In 0.20.4 via the BridgeContext and in 0.20.4 via SVGSVGElement.

After snooping around a little bit in the Batik sources I found a line with a // FIXME or something like that (I'm at home now and dosen't have the Batik sources here, but I think it was in BridgeContext or one of the instances it uses), where the float values are casted to an int loosing the decimals. Changing the width of the SVG seem to help but this would possible break some of the layout in our reports which are made for the election of the Swedish government. I will try to see if there's an error in the size of our generated SVG files. We use Illustrator to convert from EPS, and then we're tweaking them a bit.

Christer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



Reply via email to