inserting existing PDF

Hi,

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

Thanks!!
hasch73's picture
189
Joined: Nov 10 2006 - 1:36am
Last seen: 9 years 1 month 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
44929
Joined: Jun 30 2006 - 9:00am
Last seen: 1 week 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
95
Joined: Jan 7 2008 - 4:45am
Last seen: 15 years 2 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
19693
Joined: Jul 19 2006 - 5:58pm
Last seen: 3 months 5 days 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
95
Joined: Jan 7 2008 - 4:45am
Last seen: 15 years 2 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
72512
Joined: Jul 17 2006 - 1:10am
Last seen: 9 hours 18 min ago
Feedback
randomness