Class PSSurface

java.lang.Object
All Implemented Interfaces:
AutoCloseable

public final class PSSurface extends Surface
The PostScript surface is used to render cairo graphics to Adobe PostScript files and is a multi-page vector surface backend.

The following mime types are supported on source patterns: MimeType.JPEG, MimeType.UNIQUE_ID, MimeType.CCITT_FAX, MimeType.CCITT_FAX_PARAMS, MimeType.TYPE_EPS, MimeType.EPS_PARAMS.

Source surfaces used by the PostScript surface that have a MimeType.UNIQUE_ID mime type will be stored in PostScript printer memory for the duration of the print job. MimeType.UNIQUE_ID should only be used for small frequently used sources.

The MimeType.CCITT_FAX and MimeType.CCITT_FAX_PARAMS mime types are documented in CCITT Fax Images.

Embedding EPS files

Encapsulated PostScript files can be embedded in the PS output by setting the MimeType.TYPE_EPS mime data on a surface to the EPS data and painting the surface. The EPS will be scaled and translated to the extents of the surface the EPS data is attached to.

The MimeType.TYPE_EPS mime type requires the MimeType.EPS_PARAMS mime data to also be provided in order to specify the embedding parameters. MimeType.EPS_PARAMS mime data must contain a string of the form "bbox=[llx lly urx ury]" that specifies the bounding box (in PS coordinates) of the EPS graphics. The parameters are: lower left x, lower left y, upper right x, upper right y. Normally the bbox data is identical to the BoundingBox data in the EPS file.

Since:
1.2
See Also: