Re: FOP & SVG precision; how to keep thin lines precision???
Thank you very much!!! The trick you described works! I was able to print correct barcode using transform attribute! BR, Irina. - Original Message - From: "Keiron Liddle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 1:16 PM Subject: Re: FOP & SVG precision; how to keep thin lines precision??? > Hi Irina, > > I'm no barcode expert but one I tried looked fine to me. > Have you zoomed in on the barcode in the pdf document. If you view it > normally the viewer may approximate the lines and therefore distort it. > > If there is still a problem maybe you could send a small fo and pdf to > demonstrate the problem. > > An alternative may be to make the whole barcode larger, multiply by a > factor of ten say. Then place the barcode in an svg transform. This way > the values in pdf are less likely to be round off and the image will be > scaled. > > On 2002.02.06 16:50 Irina Grigorieva wrote: > > Hi, > > > > 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: > > > > > > http://www.w3.org/1999/XSL/Format"; > > xmlns:fox=http://xml.apache.org/fop/extensions> > > ... > > http://www.w3.org/2000/svg"; width="300" height="300"> > > ... > > > 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)? > > > > Please help. > > > > BR, Irina. > > > > >
Re: FOP & SVG precision; how to keep thin lines precision???
Hi Irina, I'm no barcode expert but one I tried looked fine to me. Have you zoomed in on the barcode in the pdf document. If you view it normally the viewer may approximate the lines and therefore distort it. If there is still a problem maybe you could send a small fo and pdf to demonstrate the problem. An alternative may be to make the whole barcode larger, multiply by a factor of ten say. Then place the barcode in an svg transform. This way the values in pdf are less likely to be round off and the image will be scaled. On 2002.02.06 16:50 Irina Grigorieva wrote: Hi, 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: http://www.w3.org/1999/XSL/Format"; xmlns:fox=http://xml.apache.org/fop/extensions> ... http://www.w3.org/2000/svg"; width="300" height="300"> ... ... 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)? Please help. BR, Irina.
Re: FOP & SVG precision; how to keep thin lines precision???
Irina Grigorieva wrote: Hi, 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: We had the same problem and, after much playing with SVG and the example apps at http://www.renderx.com/barcodes.html we decided to purchase barcode fonts and embed those fonts in the PDF (Instructions at http://xml.apache.org/fop/fonts.html ) Barcode fonts are not expensive and the quality is excellent. Chuck