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.
Method Summary |
void | addElementMapping(XTElementMapping mapping) add the given element mapping. |
void | addElementMapping(String mappingClassName) add the element mapping with the given class name |
void | doFormat() format the formatting object tree into an area tree |
void | doRender() render the area tree to the output form |
void | endDocument() SAX passthrough, finish rendering the document |
DocumentHandler | init(Destination dest, AttributeList atts) |
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 |
PDFOutputHandler
public PDFOutputHandler()
PDFOutputHandler
public PDFOutputHandler(OutputStream out)
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
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