views:

596

answers:

6

Hi, any experiences creating pdfs programmatically in Grails using some of the numerous java libs available ? Snippets are welcomed !

Thanks

+3  A: 

Hi, you can try the plugins Dynamic Jasper or the jasper plugin. The Dynamic Jasper plugin generates reports of your domain-class pretty simple, allowing customization of the reports. The Jasper plugin has tags to manipulate reports. The links contains snippets and samples.

Lucas
+2  A: 

I haven't used this but if your looking to generate a PDF version of your view instead of html look at this plugin. If you want to convert existing HTML into PDF look at this If you want to generate custom PDF documents that arn't closely based on your views or domain classes you can check out IText for the ability to generate complex documents.

Jared
+1  A: 

Another option is using any XSL-FO rendering library like Apache FOP.

Stefan
A: 

There's also the Export plugin which - besides PDF - generates CSV, Excel, ODS (Open Document Spreadsheets), RTF and XML.

Karsten Silz
A: 

Opted for iText, worked just fine.

xain
+1  A: 

Grails Rendering Plugin is the best option out there.

You just do a GSP (HTML+CSS) and it simply give you a PDF! Simple and fast!

Best regards!

Wanderson Santos