Biju CD
Biju CD

Reputation: 5109

Generating PDF files dynamically in servlets?

Is there any way to create PDF dynamically against receiving texts and images?

Upvotes: 4

Views: 5302

Answers (8)

ATorras
ATorras

Reputation: 4313

I work with Apache FOP and it works amazingly well. It's well supported and it's based on the XSL-FO standard.

Upvotes: 1

Paul Jowett
Paul Jowett

Reputation: 6581

A bit late but maybe useful to other searchers. Docmosis can populate templates and produce documents on the fly. Assuming you mean you need to include images and text, Docmosis can populate these on the fly from Java objects, text/image files, database queries etc. Java and Openoffice are required server-side.

Upvotes: 1

sigget
sigget

Reputation: 927

If you're doing reports based on for example SQL queries then iReport is a good choice although it's sometimes a bit heavyweight. On the other hand if you're going to produce something that's more about presentation and design, like a product sheet or a brochure then my experience is that it's alot easier to first generate html and css and then use it to generate a PDF.

Upvotes: 0

FrankS
FrankS

Reputation: 2422

iText and JasperReports are great to create pdf reports via Java.

With iReport you can easily create the jasper files needed for this. Very easy to use tool and helped me a lot when I needed to create some pdf reports.

Upvotes: 3

Jesper
Jesper

Reputation: 206946

There are several libraries for working with PDF in Java, for example iText and Apache PDFBox.

Upvotes: 2

Mark Rushakoff
Mark Rushakoff

Reputation: 258398

There's a ton of ways to generate PDFs on the fly.

In Java, you can use the iText library. If you wanted to use Jython, you could use reStructuredText and possibly rst2pdf. Or you could just generate LaTeX files on the fly and make a system call to LaTeX.

Upvotes: 1

S.Lott
S.Lott

Reputation: 391992

We use Flying Saucer.

Upvotes: 3

cletus
cletus

Reputation: 625317

You can use the iText library.

If you're generating reports then JasperReports can generate PDF output.

Upvotes: 5

Related Questions