Posts for Tag: XML

The easy way to convert XML into PDF

J4L FO Designer is a productivity tool that helps you to convert XML files into PDF by using Apache FOP, the open and free implementation of the XLS-FO standard.

Our product intends to save you a significant amount of your time, and spare you the difficulties of a manual process. As explained in my previous post “How to create PDF files from XML with Apache-FOP”, XSL-FO and Apache-FOP provide a free and standard way to create PDF files in a language independent manner.

But there are a number of disadvantages with that approach, e.g.:

  • you have to learn XSL-FO (and therefore also XPath and XSL).
  • even if you know XSL-FO you do not want to be writing FO templates using a text editor.
  • there is some logic that cannot be easily defined using XSL-FO. For example, grouping of data requires you to use the so called Muenchian method , which isn't straightforward to understand.

In order to overcome these drawbacks, at J4L Components we have developed J4L FO Designer. The designer is a Visual (WYSIWYG) editor that will generate XSL-FO files for you. This makes the start into the XSL-FO world very easy, and it is also a useful tool for experienced developers since you can create and test XSL-FO files very quickly.

How to create PDF files from XML using Apache-FOP

XML

Nowadays, XML is the native format of many applications, Oracle APEX for example, partly bases its reporting systen on XML. Middleware as Oracle BPEL, SAP PI, IBM Websphere and of course many Web services are also XML based. XML is also being used as exchange format in business to business transactions, for example for e-Invoicing. In these and many other environments there is often the need to create PDF files from XML.

XSL-FO

In the past PDF files would be created using proprietary reporting tools that would use a database as data source. Additionally these tools are programming language specific. Later on the XSL-FO standard allowed for a better way to do it in many cases.

What is new about XSL-FO?
- it is programming language neutral.
- it is a standard so you are not tied to a vendor.
- it uses XML as data source.

Apache FOP

One implementation of the XSL-FO standard is Apache FOP. One important aspect about this implementation is that the Apache license model allows to use it in commercial environment.

Many free/open source products have a license model that puts strong restrictions on the way you may use the software. Not surprisingly there are software companies that do not allow the use in their code any open source software other than Apache Foundation one. So if you use Apache you know you are on the safe side.

Procedure