开发者

Grails and pdf generation [closed]

开发者 https://www.devze.com 2022-12-20 21:05 出处:网络
It's difficult to tell what is be开发者_如何转开发ing asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
It's difficult to tell what is be开发者_如何转开发ing asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消