org.apache.fop.svg
Class PDFTranscoder
- Configurable
public class PDFTranscoder
implements Configurable
This class enables to transcode an input to a pdf 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.
$Id: PDFTranscoder.java 542237 2007-05-28 14:31:24Z jeremias $
static TranscodingHints.Key | KEY_DEVICE_RESOLUTION - The key is used to specify the resolution for on-the-fly images generated
due to complex effects like gradients and filters.
|
protected PDFDocumentGraphics2D | graphics - Graphics2D instance that is used to paint to
|
void | configure(Configuration cfg)
|
protected BridgeContext | createBridgeContext()
|
protected UserAgent | createUserAgent()
|
protected void | transcode(Document document, String uri, TranscoderOutput output) - Transcodes the specified Document as an image in the specified output.
|
KEY_DEVICE_RESOLUTION
public static final TranscodingHints.Key KEY_DEVICE_RESOLUTION
The key is used to specify the resolution for on-the-fly images generated
due to complex effects like gradients and filters.
PDFTranscoder
public PDFTranscoder()
Constructs a new ImageTranscoder.
configure
public void configure(Configuration cfg)
throws ConfigurationException
org.apache.avalon.framework.configuration.Configurable.configure(Configuration)
createBridgeContext
protected BridgeContext createBridgeContext()
org.apache.batik.transcoder.SVGAbstractTranscoder.createBridgeContext()
transcode
protected void transcode(Document document,
String uri,
TranscoderOutput output)
throws TranscoderException
Transcodes the specified Document as an image in the specified output.
document
- the document to transcodeuri
- the uri of the document or null if anyoutput
- the ouput where to transcode
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.