Rea, Matthew wrote:

I am using SVG images in a FOP generated PDF and am seeing an issue where the image width and height are rounded/clipped/truncated, however you want to put it, when I view the output PDF.

<svg width="70.914" height="79.441" viewBox="0 0 70.914 79.441" [...] >

The problem is when you look at the PDF result in Macromedia Freehand or Adobe Illustrator the image size is given as:

Width = 70pt
Height = 79pt

Where has the decimal precision gone? I am using FOP 0.20.5 on WinXP with JDK 1.3.1_03.

The PDF transcoder is based on the Image transcoder which as you notice truncates the width/height to the nearest integer. I don't believe there is any requirement that this happen for PDF, it is just how it is currently done.

The thing is I see the same behavior when I use Batik to convert the SVG to a raster image format so I am posting here to see if it is a known issue. I have investigated the lists and the docs and can find nothing. Has anyone else seen this? Or am I missing something really obvious? Any ideas?

This truncation _is_ required for 'raster' formats because they can only contain integer numbers of pixels, there is no way to output half a pixel. The baseclass for the PDF transcoder was written with raster formats in mind and this is why it truncated.


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



Reply via email to