Grails and pdf generation [closed]
any experiences creating pdfs programmatically in Grails using some of the numerous java libs available ? Snippets are welcomed !
Thanks
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!
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.
Another option is using any XSL-FO rendering library like Apache FOP.
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.
There's also the Export plugin which - besides PDF - generates CSV, Excel, ODS (Open Document Spreadsheets), RTF and XML.
Opted for iText, worked just fine.
精彩评论