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. 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=#00 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
RE: [iText-questions] difference between itext and fop?
Sorry, I forgot the attachments... -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. Test_FOP.pdf Description: Binary data Test_iText.pdf Description: Binary data
Re: [iText-questions] difference between itext and fop?
I have no doubts that it can be optimized but I don't have the time to look at it. Best Regards, Paulo Soares - Original Message - From: Vollmer, Thomas - CannonSA [EMAIL PROTECTED] To: 'Paulo Soares' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 17:33 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. 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=#00 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
RE: [iText-questions] difference between itext and fop?
Paulo, I'm sorry to annoy you with this. I'm sure there are more important things to work on in iText. If you ever decide to revisit this issue, let me know and we can compare notes. Best Regards, Thomas -Original Message- From: Paulo Soares [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 10:14 AM To: Vollmer, Thomas - CannonSA; [EMAIL PROTECTED] Subject: Re: [iText-questions] difference between itext and fop? I have no doubts that it can be optimized but I don't have the time to look at it. Best Regards, Paulo Soares 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
RE: [iText-questions] difference between itext and fop?
FOP: batik-fop-pdf iText: batik-Graphics2D-iText-pdf I think FOP does it the same way as iText: Batik-Graphics2D-FOP-PDF Take a look at org.apache.fop.svg.PDFGraphics2D. It seems to be doing exactly the same as com.lowagie.text.pdf.PdfGraphics2D. 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. That's also because the files are bigger. I see. Is there a reason iText does it this way? That's the way Graphics2D works. iText can't do better than what it receives. Hm... given that FOP and iText seem to work the same way (through a class that implements Graphics2D), I can't see why the result couldn't be the same. It seems to me that org.apache.fop.svg.PDFGraphics2D and com.lowagie.text.pdf.PdfGraphics2D are generating different PDF content from the same Batik input. I'm going to try to find out where it happens... 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
RE: [iText-questions] difference between itext and fop?
Paolo, that's exactly what I'm looking for. Currently, we're doing Batik-PDFGraphics2D-FOP-PDF, but it is pretty slow. I have been wondering for a long time if hooking up iText with Batik through PdfGraphics2D would yield better results in terms of speed but didn't get around to doing it yet. All we need to do is simple black on white line art and text. I haven't used iText before, so if if you have sample code that shows how to hook up iText with Batik, I would greatly appreciate it. Thanks, Thomas -Original Message- From: Paulo Soares [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 8:52 AM To: Leonard Rosenthol; Phillip Rhodes; [EMAIL PROTECTED] Subject: Re: [iText-questions] difference between itext and fop? Just a side note about SVG. I obtained good results with batik writing to a PdfGraphics2D. Of course that most of the psychadelic effects that are so keen to the SVG samples floating around don't work very well but FOP doesn't do much with that either. Best Regards, Paulo Soares 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: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
RE: [iText-questions] difference between itext and fop?
Paolo, Sorry, that should have read Paulo. -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: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] difference between itext and fop?
At 4:52 PM +0100 8/16/02, Paulo Soares wrote: Just a side note about SVG. I obtained good results with batik writing to a PdfGraphics2D. That's cute - Batik-PdfGraphics2D-iText-PDF. NICE! Leonard -- --- Leonard Rosentholmailto:[EMAIL PROTECTED] Chief Technical Officer http://www.pdfsages.com PDF Sages, Inc. 215-629-3700 (voice) 215-629-0789 (fax) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions