org.apache.fop.apps
Class PDFOutputHandler

|
+--org.apache.fop.fo.FOTreeBuilder
  |
  +--org.apache.fop.fo.XTFOTreeBuilder
        |
        +--org.apache.fop.apps.PDFOutputHandler

public class PDFOutputHandler
extends XTFOTreeBuilder
implements OutputDocumentHandler

A DocumentHandler that writes a PDF representation to an OutputStream. Use with James Clark's XT. Just put FOP on your class path and add to your stylesheet. Now XT will automatically call FOP.


Constructor Summary
PDFOutputHandler()
           
PDFOutputHandler(OutputStream out)
           

Method Summary
 voidaddElementMapping(XTElementMapping mapping)
          add the given element mapping.
 voidaddElementMapping(String mappingClassName)
          add the element mapping with the given class name
 voiddoFormat()
          format the formatting object tree into an area tree
 voiddoRender()
          render the area tree to the output form
 voidendDocument()
          SAX passthrough, finish rendering the document
 DocumentHandlerinit(Destination dest, AttributeList atts)
           
 voidsetRenderer(String rendererClassName, String producer)
          set the class name of the Renderer to use as well as the producer string for those renderers that can make use of it

Methods inherited from class org.apache.fop.fo.XTFOTreeBuilder
endElement, startElement

Methods inherited from class org.apache.fop.fo.FOTreeBuilder
addElementPropertyList, addMapping, addPropertyList, characters, endElement, format, startDocument, startElement

Constructor Detail

PDFOutputHandler

public PDFOutputHandler()

PDFOutputHandler

public PDFOutputHandler(OutputStream out)
Method Detail

addElementMapping

public void addElementMapping(XTElementMapping mapping)
add the given element mapping. an element mapping maps element names to Java classes

addElementMapping

public void addElementMapping(String mappingClassName)
add the element mapping with the given class name

doFormat

public void doFormat()
throws FOPException
format the formatting object tree into an area tree

doRender

public void doRender()
throws java.io.IOException,
FOPException
render the area tree to the output form

endDocument

public void endDocument()
throws SAXException
SAX passthrough, finish rendering the document

init

public DocumentHandler init(Destination dest, AttributeList atts)
throws java.io.IOException

setRenderer

public void setRenderer(String rendererClassName, String producer)
set the class name of the Renderer to use as well as the producer string for those renderers that can make use of it

Association Links

to Class org.apache.fop.layout.AreaTree

the area tree that is the result of formatting the FO tree

to Class org.apache.fop.render.Renderer

the renderer to use to output the area tree

to Class java.io.PrintWriter

the PrintWriter to use to output the results of the renderer

to Class java.io.OutputStream

the stream to use to output the results of the renderer