New Technologies

  • Java
  • Javascript
  • DTML
  • Dot Net
  • ASP .Net
  • C# .Net
  • PHP
Your Ad Here

Monday, December 15, 2008

Apache FOP- PDF RTF generation for JAVA

Apache FOP

Domain path: for examples and packages:

\\domain\JAVA\CODE LIBRARY\FOP_PDF_RTF_generationpackage

Introduction

Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.

Render Diagram

A beta release of the latest version of FOP (0.95) is now available. After a short testing period it will become the third stable release after the large redesign effort and will implement a large subset of the XSL-FO Version 1.1 W3C Recommendation.

Support for each of the standard’s objects and properties is detailed in FOP Compliance. Download options include a precompiled version, source code, and many example files to get you started. Resources include links to XSL-FO introductions and many other useful references. A checklist for Getting Help will guide you toward maximizing the usefulness of FOP.

FOP is proud to be part of Apache’s XML Graphics project.

Demonstration

Formatting Diagram

This image is a demonstration of a real two page document. The xml data on the left is formatted into the two pages on the right. The document contains static areas that appear on every page, an external graphic, a footnote on the first page, and a table that goes across both pages.

FOP uses the standard XSL-FO file format as input, lays the content out into pages, then renders it to the requested output. One great advantage of using XSL-FO as input is that XSL-FO is itself an XML file, which means that it can be conveniently created from a variety of sources. The most common method is to convert semantic XML to XSL-FO, using an XSLT transformation.

FOP Objectives

The goals of the Apache FOP project are to deliver an XSL-FO to PDF formatter that is compliant to at least the Basic conformance level described in the W3C Recommendation from 05 December 2006, and that complies with the November 2001 Portable Document Format Specification (Version 1.4) from Adobe Systems.

Conformance to the XML 1.0 Recommendation, XSLT 1.0 Recommendation and the XML Namespaces Recommendation is understood. Other relevant documents, such as the XPath and XLink Working Drafts, are referenced as necessary. The FOP Project will attempt to use the latest version of evolving specifications.

 

No comments:

Your Ad Here