On 11/27/2013 4:47 PM, Diego Villatora wrote: > Hi guys, > I'm working on a series of reports using iText and a problem I've got > now it's the increasing size of the final pdf. > I would like to re-use the same image we use as a logo for each > page.This would definitely improve the memory performance and the file > size. > But I cannot find a good example/explanation regarding this aspect. > Can you help me to find some sort of information about this?
If you create an Image object with the logo only once, you should reuse this object and the image bytes will be used only once. If you create an Image object multiple times (for instance: because you add it on different places in the PDF), the image bytes are added redundantly. In other words: you have a design error in your application if you see the behavior you describe. If you're talking about the size of a final PDF after concatenating existing PDFs containing the same image: use PdfSmartCopy instead of PdfCopy. ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php