Jump to content

inserting existing PDF


hasch73

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

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

Link to comment
Share on other sites

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 cents

C-Box

Post edited by: CBox, at: 2008/01/10 10:51

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

  • 15 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...