org.apache.fop.render.ps
public class PSSVGHandler extends java.lang.Object implements XMLHandler, PSRendererContextConstants
Modifier and Type | Class and Description |
---|---|
static class |
PSSVGHandler.PSInfo
PostScript information structure for drawing the XML document.
|
HANDLE_ALL
PS_FONT_INFO, PS_GENERATOR
FOREIGN_ATTRIBUTES, HANDLER_CONFIGURATION, HEIGHT, OUTPUT_STREAM, PAGE_VIEWPORT, WIDTH, XPOS, YPOS
Constructor and Description |
---|
PSSVGHandler()
Create a new PostScript XML handler for use by the PostScript renderer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNamespace() |
static PSSVGHandler.PSInfo |
getPSInfo(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,
PSSVGHandler.PSInfo psInfo)
Render the svg document.
|
boolean |
supportsRenderer(Renderer renderer)
Checks if this XMLHandler supports handling an XML namespace for a particular renderer.
|
public PSSVGHandler()
public void handleXML(RendererContext context, org.w3c.dom.Document doc, java.lang.String ns) throws java.lang.Exception
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 objectjava.lang.Exception
- If an error occurs during processing.public static PSSVGHandler.PSInfo getPSInfo(RendererContext context)
context
- the renderer contextprotected void renderSVGDocument(RendererContext context, org.w3c.dom.Document doc, PSSVGHandler.PSInfo psInfo)
context
- the renderer contextdoc
- the svg documentpsInfo
- the pdf information of the current contextpublic boolean supportsRenderer(Renderer renderer)
supportsRenderer
in interface XMLHandler
renderer
- the renderer for which to check.public java.lang.String getNamespace()
getNamespace
in interface XMLHandler
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.