PDF files with embedded images problem

By: Marty Jones - martyj
PDF files with embedded images problem
2004-04-13 12:57
I have a report that has several .jpg images within in (some are in subreports). I noticed that the filesize of the generated pdf file is enourmous. For instance, for a 2000 page report without the images, the filesize is around 4.6 meg. The same report with images is about 65 meg! I have the useCache feature turned on for all the images. It looks like Itext is not reusing the static images. Is there a way I can force it to do this?

By: Marty Jones - martyj
RE: PDF files with embedded images problem
2004-04-16 05:46
After some research I have found that indeed Itext is not sharing images within the PDF. The reason for this is because JasperReports is creating a new image for every image element in the report. I have made a change or two to the source code of Jasper Reports and now the size of the PDF is much smaller because Itext is now sharing the duplicated images. I would like to submit this change into a patch but I am not sure how I go about doing this.

Anybody know how to submit a patch?

By: Chuck Deal - cdeal
RE: PDF files with embedded images problem
2004-04-16 06:32
There is a Patches section on SourceForge. After you post the Patch, you may want to get Teodor's attention and let him know the patch is available. After that, I would assume Teodor would find the time to review the patch and see if it can be included in the distribution.

Hopefully, Teodor will see this message and comment further... :)

By: Teodor Danciu - teodord
RE: PDF files with embedded images problem
2004-04-17 03:06


Follow Charles advise.
I'll dig into it.

Thank you,
ktrinad's picture
Joined: Aug 9 2006 - 2:36am
Last seen: 16 years 9 months ago

0 Answers:

No answers yet