hasch73 Posted December 10, 2007 Share Posted December 10, 2007 Hi, i create my PDF with jasperreports 2.0.0 .Can i add a existing PDF to my generated PDF??? Thanks!! Link to comment Share on other sites More sharing options...
Teodor Danciu Posted December 14, 2007 Share Posted December 14, 2007 Hi, You need to look into PDF specialized libraries such as iText. JasperReports is not a PDF library. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
meisner Posted January 10, 2008 Share Posted January 10, 2008 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)? RegardsMoritz Link to comment Share on other sites More sharing options...
C-Box Posted January 10, 2008 Share Posted January 10, 2008 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) {...} a few things Jasper can't and shouldn't do are for your own brain! :P 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... just my two centsC-BoxPost edited by: CBox, at: 2008/01/10 10:51 Link to comment Share on other sites More sharing options...
meisner Posted January 10, 2008 Share Posted January 10, 2008 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? RegardsMoritz Link to comment Share on other sites More sharing options...
lucianc Posted January 10, 2008 Share Posted January 10, 2008 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 Link to comment Share on other sites More sharing options...
johannes.held Posted May 8, 2023 Share Posted May 8, 2023 Could https://github.com/katjas/PDFrenderer be an option to render a PDF inside an image expression in Jaspersoft report?Utilizing the interface Graphics2DRenderable? https://jasperreports.sourceforge.net/api/net/sf/jasperreports/renderers/Graphics2DRenderable.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now