> iText does it the correct way. The curves you see are to make > the round end caps.
FOP actually does it the correct way, too. I'm sorry, I removed too much of the context around the PDF generated by FOP so this wasn't shown. The full relevant section of the PDF is: 0 G 1 J 1 j 0.5 w 10 M 1 0 0 1 0 0 cm 10 10 m 100 10 l S The PDF spec says: G = set stroking color J = set line cap j = set line join w = set stroke width M = set miter limit So, the first couple of lines actually set all the attributes of the line that are specified in the SVG, including the round end caps. I can't see these PDF commands anywhere in the PDF that iText generated (I attached both PDFs for reference). So, it seems to me that iText doesn't use some of these commands but instead does it the "manual" way. Do you if iText ever uses the commands mentioned above? And if not, why not? I'll dig around in the source code some more... Best Regards, Thomas > -----Original Message----- > From: Paulo Soares [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 18, 2002 3:35 AM > To: Vollmer, Thomas - CannonSA; [EMAIL PROTECTED] > Subject: Re: [iText-questions] difference between itext and fop? > > > iText does it the correct way. The curves you see are to make > the round end > caps. Maybe some parameter in PdfGraphics2D could exist to relax the > generation of some lines if size/performance was more important. > > Best Regards, > Paulo Soares > > ----- Original Message ----- > From: "Vollmer, Thomas - CannonSA" <[EMAIL PROTECTED]> > To: "'Paulo Soares'" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Wednesday, September 18, 2002 1:08 > Subject: RE: [iText-questions] difference between itext and fop? > > > > Ok, I figured out how to make FOP generate uncompressed > > PDF and compared the output FOP and iText generate for > > a very simple SVG element. > > > > SVG: > > <path fill="none" stroke="#000000" stroke-width="0.5" > > stroke-linecap="round" stroke-linejoin="round" > > stroke-miterlimit="10" d="M10,10H100"/> > > > > FOP (noise removed): > > 10 10 m > > 100 10 l > > S > > > > iText (noise removed): > > 10 89.75 m > > 100 89.75 l > > 100.14 89.75 100.25 89.86 100.25 90 c > > 100.25 90.14 100.14 90.25 100 90.25 c > > 10 90.25 l > > 9.86 90.25 9.75 90.14 9.75 90 c > > 9.75 89.86 9.86 89.75 10 89.75 c > > h > > f > > > > (The differences in y coordinates are due to differences > > in the transformation matrices that are in effect.) > > > > Is this the effect you were describing when you said: > > > > > > > That's because with fop for a line you'll have a width set > > > > > and a line draw and with iText it's a rectangle followed > > > > > by a fill. > > > > Could it be due to this piece of code in class > > com.lowagie.text.pdf.PdfGraphics2D? > > > > private void followPath(Shape s, int drawType) { > > ... > > if (drawType==STROKE) { > > s = stroke.createStrokedShape(s); > > followPath(s, FILL); > > return; > > } > > ... > > } > > > > It looks like it doesn't want to do STROKE, it only > > wants to do FILL. What would happen if it would > > allow STROKE? > > > > > > > > Best Regards, > > Thomas ************************************ If this email is not intended for you, or you are not responsible for the delivery of this message to the addressee, please note that this message may contain ITT Privileged/Proprietary Information. In such a case, you may not copy or deliver this message to anyone. You should destroy this message and kindly notify the sender by reply email. Information contained in this message that does not relate to the business of ITT is neither endorsed by nor attributable to ITT. ************************************ ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
