I faced a problem. I need to generate barcodes (it is not a problem) and draw it into PDF.
That is, to draw several rectangles...
The FO document looks like:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox=http://xml.apache.org/fop/extensions>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="300" height="300">
<svg:rect x="0" y="0" stroke-width="0" stroke="none" fill="black" height="50" width="1"/>
When setting small _and_ fractional values to rectangle widths, they are displayed incorrectly:
the rectangles that should be the same widths differs in real widths about.. several times.
However, the value "1" is displayed correctly.
As far as I could understand, the problem is FOP precision is 72 dots per inch, that's why
any fractional values like 0.5..1.5 produces huge distortions.
Am I right? Is it a feature of SVG, a feature of FOP? Can I use something different than Batik for SVG?
Would generating images solve the problem of precision (if then place these images into PDF with FOP)?
- Re: FOP & SVG precision; how to keep thin lines preci... Irina Grigorieva
- Re: FOP & SVG precision; how to keep thin lines ... Chuck Paussa
- Re: FOP & SVG precision; how to keep thin lines ... Keiron Liddle
- Re: FOP & SVG precision; how to keep thin li... Irina Grigorieva