|
fop 0.92beta | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.pdf.PDFSVGHandler
PDF XML handler for SVG (uses Apache Batik). This handler handles XML for foreign objects when rendering to PDF. It renders SVG to the PDF document using the PDFGraphics2D. The properties from the PDF renderer are subject to change.
Nested Class Summary | |
static class |
PDFSVGHandler.PDFInfo
PDF information structure for drawing the XML document. |
Field Summary |
Fields inherited from interface org.apache.fop.render.XMLHandler |
HANDLE_ALL |
Fields inherited from interface org.apache.fop.render.pdf.PDFRendererContextConstants |
PDF_CONTEXT, PDF_DOCUMENT, PDF_FONT_INFO, PDF_FONT_NAME, PDF_FONT_SIZE, PDF_PAGE, PDF_STATE, PDF_STREAM |
Fields inherited from interface org.apache.fop.render.RendererContextConstants |
HANDLER_CONFIGURATION, HEIGHT, OUTPUT_STREAM, PAGE_VIEWPORT, WIDTH, XPOS, YPOS |
Constructor Summary | |
PDFSVGHandler()
Create a new PDF XML handler for use by the PDF renderer. |
Method Summary | |
java.lang.String |
getNamespace()
|
static PDFSVGHandler.PDFInfo |
getPDFInfo(RendererContext context)
Get the pdf information from the render context. |
void |
handleXML(RendererContext context,
org.w3c.dom.Document doc,
java.lang.String ns)
Handle an external xml document inside a Foreign Object Area. |
protected void |
renderSVGDocument(RendererContext context,
org.w3c.dom.Document doc,
PDFSVGHandler.PDFInfo pdfInfo)
Render the svg document. |
boolean |
supportsRenderer(Renderer renderer)
Checks if this XMLHandler supports handling an XML namespace for a particular renderer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PDFSVGHandler()
Method Detail |
public void handleXML(RendererContext context, org.w3c.dom.Document doc, java.lang.String ns) throws java.lang.Exception
XMLHandler
Handle an external xml document inside a Foreign Object Area.
This may throw an exception if for some reason it cannot be handled. The caller is expected to deal with this exception.
The implementation may convert the XML document internally to another XML dialect (SVG, for example) and call renderXML() on the AbstractRenderer again (which can be retrieved through the RendererContext).
handleXML
in interface XMLHandler
context
- The RendererContext (contains the user agent)doc
- A DOM containing the foreign object to be
processedns
- The Namespace of the foreign object
java.lang.Exception
- If an error occurs during processing.XMLHandler
public static PDFSVGHandler.PDFInfo getPDFInfo(RendererContext context)
context
- the renderer context
protected void renderSVGDocument(RendererContext context, org.w3c.dom.Document doc, PDFSVGHandler.PDFInfo pdfInfo)
context
- the renderer contextdoc
- the svg documentpdfInfo
- the pdf information of the current contextpublic boolean supportsRenderer(Renderer renderer)
XMLHandler
supportsRenderer
in interface XMLHandler
renderer
- the renderer for which to check.
XMLHandler.supportsRenderer(org.apache.fop.render.Renderer)
public java.lang.String getNamespace()
getNamespace
in interface XMLHandler
XMLHandler.getNamespace()
|
fop 0.92beta | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |