![]() There are a couple of transitive dependencies that are pulled in automatically. For the ODT-to-PDF workflow, using Freemarker template engine, I needed to add the following dependencies to my pom.xml: įr.įr.odfdom It supports both ODT and DOCX templates, two different template engines (Freemarker and Velocity) and multiple target formats (docx/odt, xhtml, pdf). XDocReport is a well modularised project with several different configuration possibilities. As it practically replicates the rendering of ODT/DOCX files, the resulted file is not necessarily as perfect as with real OpenOffice, but nothing serious came up during my experiments.īased on my good experiences, I wrote the following tutorial on how you can set it up to your Java web application.ĭownload our free guide to the Future of Web Apps Preparations and dependencies As it also has a liberal license, I decided to give it a try in my recent example application. XDocReport is a library with a similar target, but it works completely within the JVM, making it really easy for development and deployment. Also, JODConverter currently has no official maintainer, although there are several active forks in the Github. The usage of OpenOffice gives you pixel perfect results, but on the other hand, your application won’t be as portable and easy to setup. It uses the real OpenOffice installation behind the scenes to generate the report. ![]() JODReports/JODConverter is a popular tool with this approach. The big advantage with this approach is that you have a “visual editor” already installed on your computer and even your mother can use it. Why not use your favourite office suite as the template editor?Īn interesting approach is to use normal office documents, like ODT or DOCX files, as templates. Apache FOP is another possibility, but has pretty much the same drawback - there is no free and easy to use template editor for it. The actual library is OSS, but if you wish to have a good visual editor for the templates, you probably want to flash your credit card. There are both “low level” libraries like iText and PDFBox that you can command with raw Java APIs and several template based solutions.įrom template based solutions, JasperReports is one of the most commonly used tools. Developers in the JVM ecosystem have a huge set of mature industry proven solutions for doing this. ![]() This is why pretty much all software developers have at some point faced a requirement to create PDF files like receipts or reports. The PDF format has established a strong position as a format used for printing and archiving formal documents.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |