org.apache.fop.render.ps

Class PSSVGHandler

Implemented Interfaces:
PSRendererContextConstants, RendererContextConstants, XMLHandler

public class PSSVGHandler
extends java.lang.Object
implements XMLHandler, PSRendererContextConstants

PostScript XML handler for SVG. Uses Apache Batik for SVG processing. This handler handles XML for foreign objects when rendering to PostScript. It renders SVG to the PostScript document using the PSGraphics2D. The properties from the PostScript renderer are subject to change.
Version:
$Id: PSSVGHandler.java 557337 2007-07-18 17:37:14Z adelmelle $

Nested Class Summary

static class
PSSVGHandler.PSInfo
PostScript information structure for drawing the XML document.

Fields inherited from interface org.apache.fop.render.ps.PSRendererContextConstants

PS_FONT_INFO, PS_GENERATOR

Fields inherited from interface org.apache.fop.render.RendererContextConstants

FOREIGN_ATTRIBUTES, HANDLER_CONFIGURATION, HEIGHT, OUTPUT_STREAM, PAGE_VIEWPORT, WIDTH, XPOS, YPOS

Fields inherited from interface org.apache.fop.render.XMLHandler

HANDLE_ALL

Constructor Summary

PSSVGHandler()
Create a new PostScript XML handler for use by the PostScript renderer.

Method Summary

String
getNamespace()
static PSSVGHandler.PSInfo
getPSInfo(RendererContext context)
Get the pdf information from the render context.
void
handleXML(RendererContext context, Document doc, String ns)
protected void
renderSVGDocument(RendererContext context, Document doc, PSSVGHandler.PSInfo psInfo)
Render the svg document.
boolean
supportsRenderer(Renderer renderer)

Constructor Details

PSSVGHandler

public PSSVGHandler()
Create a new PostScript XML handler for use by the PostScript renderer.

Method Details

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface XMLHandler

getPSInfo

public static PSSVGHandler.PSInfo getPSInfo(RendererContext context)
Get the pdf information from the render context.
Parameters:
context - the renderer context
Returns:
the pdf information retrieved from the context

handleXML

public void handleXML(RendererContext context,
                      Document doc,
                      String ns)
            throws Exception
Specified by:
handleXML in interface XMLHandler

renderSVGDocument

protected void renderSVGDocument(RendererContext context,
                                 Document doc,
                                 PSSVGHandler.PSInfo psInfo)
Render the svg document.
Parameters:
context - the renderer context
doc - the svg document
psInfo - the pdf information of the current context

supportsRenderer

public boolean supportsRenderer(Renderer renderer)
Specified by:
supportsRenderer in interface XMLHandler

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.