XSL-FO is an XML format used for driving publishing tools. In order to use it a program called a renderer is necessary. The most common target for rendering is the PDF format, although there are other output formats in use such as PCL (HP Printer Control Language) or RTF. An open-source engine is available from the Apache project named FOP that will converts XSL-FO into PDF. This is suitable for use in the following areas:
For many versions now, Stylus Studio® has included the most stable version of Apache FOP, 0.20.5. (The next version, 0.92 beta, is still in beta form, and is not yet suitable for inclusion. However, it could be downloaded manually and used as an external post-processor with Stylus Studio®.)
Configuring Stylus Studio® for Apache FOP Use
To switch to using PDF output, we'll need to get to the Scenarios dialog for the XSLT or XQuery program we're working on. Then go to the "Post-process" tab.
Switch your processing from "Do not perform..." to "Post process with Apache FOP", and you are set to go. (Note that although you can install any XSL-FO to PDF renderer, only Apache FOP and RenderX XEP are included with Stylus Studio®.)
Now, we are ready to begin actually using Stylus Studio® and the Apache FOP rendering engine together.
Transforming XML and Rendering the XSL-FO File with Apache FOP
Choose your XSL-FO file. If you were to use the same ones as used on the RenderX XEP demonstration page for this demonstration, you could do File|Open and navigate to the directory in which you unzipped them to get:
Next, choose the Scenario Properties dialog, either from the XSLT or XQuery menu or
from the button, and set the Source XML URL.
For the XPath 1.0 specification, choose the
Next, choose the Post-process tab. There, select "Post process with Apache FOP". That's all it takes to configure FOP to work with Stylus Studio®.
Now choose XSLT|Preview Result (or XQuery|Preview Result) or click on the icon, and the preview window will show the PDF as generated by Stylus Studio® driving Apache FOP.
(click to enlarge)
Whether you are interested in XSL-FO, Apache FOP, or Stylus Studio®, we've got the goods. Try it yourself by heading over to here to download a copy of Stylus Studio® with Apache FOP, and explore both the XML Editor and the XML Publishing module for designing beautiful XML reports.
PURCHASE STYLUS STUDIO ONLINE TODAY!!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Try STYLUS Apache FOP Tools
Download a free trial of our powerful tools for building advanced publishing applications using the Apache FOP processor.
Convert XML to PDF
Publish XML to PDF with Stylus Studio's XSL-FO Editor and visual XSL:FO tools featuring support for the world's leading XSL:FO processing components.
Learn Stylus Studio in 6 Minutes
Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!
Watch our new online video tutorial: An Introduction to Stylesheet Design covers in detail how to visually design publishing and content management applications using W3C standards including XML, XSL, XSL:FO, XSLT and XQuery.