Class EPSTranscoder

java.lang.Object
org.apache.batik.transcoder.TranscoderSupport
org.apache.batik.transcoder.AbstractTranscoder
org.apache.batik.transcoder.XMLAbstractTranscoder
org.apache.batik.transcoder.SVGAbstractTranscoder
All Implemented Interfaces:
org.apache.batik.transcoder.Transcoder, Configurable

public class EPSTranscoder extends AbstractPSTranscoder

This class enables to transcode an input to a EPS 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.

This work was authored by Keiron Liddle (keiron@aftexsw.com).

  • Constructor Details

    • EPSTranscoder

      public EPSTranscoder()
      Constructs a new EPSTranscoder.
  • Method Details

    • createDocumentGraphics2D

      protected org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D createDocumentGraphics2D()
      Creates the root Graphics2D instance for generating PostScript.
      Specified by:
      createDocumentGraphics2D in class AbstractPSTranscoder
      Returns:
      the root Graphics2D