inserting existing PDF

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hi,

i create my PDF with jasperreports 2.0.0 .
Can i add a existing PDF to my generated PDF???

Thanks!!
hasch73's picture
139
Joined: Nov 10 2006 - 1:36am
Last seen: 8 years 4 months ago

5 Answers:

Hi,

You need to look into PDF specialized libraries such as iText. JasperReports is not a PDF library.

I hope this helps.
Teodor
teodord's picture
26324
Joined: Jun 30 2006 - 9:00am
Last seen: 2 months 4 days ago
Hi,

isn't there a standardized way to use iText to read a PDF and turn it into an object that implements JRRenderable?

I understand, that Jasper is not a PDF library. But isn't it a basic requirement for a report to have PDF images in them (like for company logos)?

Regards
Moritz
meisner's picture
41
Joined: Jan 7 2008 - 4:45am
Last seen: 14 years 5 months ago
As iText is a needed library in Jasper you can easily merge PDFs with it... therefore I wrote a simple method that get some PDF-Files (where ever from) and merges them to one single PDF File...

We need that for example to merge the JasperReport Output as PDF with an existing CAD drawing exported to PDF also and print it as one single PrintJob for DuplexPrinter or to send it via eMail as one single PDF file (so report + technical document from CAD).

Code:
public static  File getMergePdfFile(ArrayList<File> sourcePdfs, File destFile) {<br />
...<br />
}</td></tr></tbody></table><br />
<br />
a few things Jasper can't <b>and </b>shouldn't do are for your own brain! :P <br />
<br />
And by the way.... logos shouldn't be in PDF format as this is more a DOCUMENT format and not an IMAGE format... Supported images are JPG / GIF / PNG...<br />
<br />
just my two cents<br />
C-Box<br>Post edited by: CBox, at: 2008/01/10 10:51
C-Box's picture
11672
Joined: Jul 19 2006 - 5:58pm
Last seen: 2 months 4 weeks ago
The thing that I actually want to do is place a vector based image in the report. Be it PDF (since it's so wide spread) or whatever.

I simply need to produce high quality reports with logos that are dynamically located. So stamping in a second step is not a good option.

I think a good reporting tool should support placing vector based images - especially if the foundation (iText) is already there.

So my question remains: isn't there a way to turn a vector based image (PDF, EPS whatever) into a JRRenderable?


Regards
Moritz
meisner's picture
41
Joined: Jan 7 2008 - 4:45am
Last seen: 14 years 5 months ago
meisner wrote:
So my question remains: isn't there a way to turn a vector based image (PDF, EPS whatever) into a JRRenderable?


You can use SVG images via Batik. I don't know whether there are Java libraries that are able to draw/render PDF or EPS images.

Regards,
Lucian
lucianc's picture
43086
Joined: Jul 17 2006 - 1:10am
Last seen: 1 day 12 hours ago
Feedback
randomness