Like other users, we would like to define existing PDF files as background for Jasper Reports templates. One use case behind this requirement is as follows:
The user has designed a letter header and footer in MS Word. Now we want to give him a possibility to use this layout for his reports (in this case invoices are to be created).
If PDF files were supported, he could simply save the MS Word document as a PDF file and use it directly in report generation.
Why can't we use raster graphics (e.g. PNG):
Jasper Reports advertises high quality reports. From our point of view, this includes that raster graphics should be avoided as far as possible, since they are always blurred above a certain zoom level and/or require a lot of memory. For this reason, we can well understand the community user "hasch73" with the following post:
https://community.jaspersoft.com/questions/520130/inserting-existing-pdf
Another disadvantage of this approach is that the contained text (e.g. an address) cannot be selected in the generated PDF file and cannot be copied as a result. This is possible with a PDF file as background.
Why can't we use SVG files:
As mentioned above, our customers use MS-Word. Here there is no easy way to create a SVG graphic.
Why can't we use a library (e.g. iText) to embed the PDF file in a post-processing step:
A post-processing step makes things unnecessarily complicated. Most importantly, this has a bad effect on performance, since the generated PDF file has to be read in completely again.
Why can't we take the approach suggested by TIBCO:
The following page suggests an approach from TIBCO.
https://community.jaspersoft.com/wiki/how-embed-pdf-report-output
We consider the requirement we mentioned as a state-of-the-art feature (especially for the professional version of Jasper Reports). So this should be possible out-of-the-box without having to write a custom generic element handler. Especially not, because there are some other Jasper users asking for this feature (see various community posts).
Components | JasperSoft Studio, JasperReports Library |