Hello, I'm working with s.laisne and I will describe with more details the investigation :
With profiling, we have found that the time is spent in : PDFGraphics2D class : setPaint(boolean, double, double, boolean) http://www.nabble.com/file/p21477920/Profiling.bmp Our SVG contains Patterns, that's why in our case, the last else case is executed. The paint attribute is a PatternPaint for Batik. In this case, a rectangle is made from the image size. Then it is converted with the invert transform with the createTransformedShape function : the return type is a java.awt.geom.GeneralPath. The fact to fill a generalPath takes around 3 s. But we have around 20 patterns to display so the SVG makes 1 minute to be displayed. If we want to display 15 times the same SVG, the report takes 15 minutes. That's why, we try a patch that not converts the Rectangle if the transform is identity (the affineTransform equals to ((1, 0, 0), (0, 1, 0)) . In our SVG case, the transform is identity so the fillRect variable stays as a Rectangle and the fill function takes no time. Now, displaying 15 times the SVG takes 3 minutes. But if the transform is not identity, we have always a generalPath to fill which can take a lot of time. What do you think about this patch ? Have you solutions to improve the fill function ? The SVG file is put in a attached file of this message. http://www.nabble.com/file/p21477920/example.svg example.svg Thank you, Best regards Anne-Sophie DREUX slaisne wrote: > > I prepare you samples with the svg file and 2 pdfs (one with iText, one > with MacOsx) > -- View this message in context: http://www.nabble.com/SVG-and-iText-tp21036090p21477920.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
