Our Rails Connector includes a component, the PDF generator, for creating PDF files from within a Rails application. For this, a web service interface is used.
The PDF generator makes use of Apache FOP (Formatting Objects Processor), a Java application that translates an XML file into a PDF file. The rules for generating the layout are taken from an XSL style sheet. A sample stylesheet is included.
The PDF generator has two modes, an external and an internal mode.
In the external mode, external sources can be specified for both the XML and the XSL file. This allows for using a different application (a PHP application, for example) als the source.
The internal mode, on the other hand, makes it possible for the programmer to generate PDF files from CMS files. A flexible and extendible mechanism is used to achieve this.
The PDF generator is deactivated by default and needs to be configured first. Afterwards, it can be used without further effort since all the required files are included.