org.apache.fop.render.ps

Class AbstractPSTranscoder

Known Direct Subclasses:
EPSTranscoder, PSTranscoder

public abstract class AbstractPSTranscoder
extends AbstractFOPTranscoder

This class enables to transcode an input to a PostScript document.

Two transcoding hints (KEY_WIDTH and KEY_HEIGHT) can be used to respectively specify the image width and the image height. If only one of these keys is specified, the transcoder preserves the aspect ratio of the original image.

The KEY_BACKGROUND_COLOR defines the background color to use for opaque image formats, or the background color that may be used for image formats that support alpha channel.

The KEY_AOI represents the area of interest to paint in device space.

Three additional transcoding hints that act on the SVG processor can be specified:

KEY_LANGUAGE to set the default language to use (may be used by a <switch> SVG element for example), KEY_USER_STYLESHEET_URI to fix the URI of a user stylesheet, and KEY_PIXEL_TO_MM to specify the pixel to millimeter conversion factor.

Version:
$Id: AbstractPSTranscoder.java 627367 2008-02-13 12:03:30Z maxberger $
Author:
Keiron Liddle

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.fop.svg.AbstractFOPTranscoder

AbstractFOPTranscoder.FOPErrorHandler, AbstractFOPTranscoder.FOPTranscoderUserAgent

Field Summary

protected AbstractPSDocumentGraphics2D
graphics

Fields inherited from class org.apache.fop.svg.AbstractFOPTranscoder

KEY_STROKE_TEXT, VALUE_FORMAT_OFF, VALUE_FORMAT_ON, userAgent

Constructor Summary

AbstractPSTranscoder()
Constructs a new AbstractPSTranscoder.

Method Summary

protected BridgeContext
createBridgeContext()
protected abstract AbstractPSDocumentGraphics2D
createDocumentGraphics2D()
protected void
transcode(Document document, String uri, TranscoderOutput output)
Transcodes the specified Document as an image in the specified output.

Methods inherited from class org.apache.fop.svg.AbstractFOPTranscoder

createDocumentFactory, createUserAgent, getLogger, isTextStroked, setEntityResolver, setLogger

Field Details

graphics

protected AbstractPSDocumentGraphics2D graphics

Constructor Details

AbstractPSTranscoder

public AbstractPSTranscoder()
Constructs a new AbstractPSTranscoder.

Method Details

createBridgeContext

protected BridgeContext createBridgeContext()

createDocumentGraphics2D

protected abstract AbstractPSDocumentGraphics2D createDocumentGraphics2D()

transcode

protected void transcode(Document document,
                         String uri,
                         TranscoderOutput output)
            throws TranscoderException
Transcodes the specified Document as an image in the specified output.
Parameters:
document - the document to transcode
uri - the uri of the document or null if any
output - the ouput where to transcode

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