Converting XML to PDF Using FOP

XML reports can be converted to PDF format by using the Formatting Objects Processor (FOP). FOP is an Open source Java API that can convert your XML data to other formats like TXT, SVG, AWT, MIF and PS.This is free software that was developed under Apache XML Project.


_______________________________________________

One of the major advantages of using an FOP is its ability to convert XML data into reports in the PDF format, using a formatting tree. FOP can be down loaded from http://www.apache.org/dyn/closer.cgi/xml/fop

FOP is a tool that understands formatting objects as specified by the W3C in the XSL specification. First part of this specification deals with the XSLT transformations. The second part deals with the Formatting objects (FO). This is a output independent specification that, which can compose a vocabulary for style and layout of a document. An FO is a simple XML document. Its namespace is defined in www.w3.org/1999/xsl/format

You can manually create this document and specify exact values for every element in the output. However, the general approach is to write an XSLT style sheet to take your XML data file, transform it according to your style sheet and produce a final FO document. Although the main idea of FOP is to work on the FO document, it can also transform the existing data (XML) using a style sheet.

XSL: FO is an XML based document layout and formatting language that is used for creating Postscript, and the other common formats from XMl document. To design the XSL: FO follow these steps:

1. Open an existing schema, DTD or a Database, the XML content model appears on the left hand pane.
2. Select the item or attribute that you want in your output.
3. Drag it from the left panel to the main output window and specify the new node to be handled.
4. The XSL: FO style sheet thus resulted is generated automatically and can be previewed by clicking on the XSL: FO tab.



_______________________________________________

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________



FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

Copyright - © 2004 - 2017 - All Rights Reserved.