Skip to main content
Skip table of contents

PageSize and selection

This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

The PageSize key operates as described in [RB3]. However, you can use several extensions to modify its behavior.

The Harlequin RIP’s default PageSize policy is 8. This policy is not listed in [RB3]; it is a GGS extension which is the same as policy 7 except that the page size is expanded to fill the raster's size. (An attribute dictionary is nevertheless selected in the usual way.) PageSize policy 8 behaves like policy 7 (no scaling) if RasterBBox or RasterDeviceBBox are matched in the InputAttributes dictionary to set an explicit raster size.

Zero page sizes

In an InputAttributes dictionary, either or both dimensions of PageSize can be zero in the RIP. In this case, the zero acts as a wild card, allowing any PageSize requested to match in that dimension. This means that whether or not policies 7 or 8 are used, you can always select a requested PageSize.

Typically, use /PageSize [0 0] in an environment where no dimension needs to be constrained (for example, for a window on a monitor). A zero in the y direction means there is only a constraint in x (which is typical of a capstan recorder).


The media-matching algorithm specifies that a PageSize matches either in the original orientation or when rotated through 90 deg. This does not offer the degree of predictability required, so this behavior can be turned off: if the page device key OneWayMedium is set to true, media matching only considers page sizes in their original orientation. For example, consider:

            <</InputAttributes <<
              0 << /PageSize [500 600] >>
              1 << /PageSize [600 500] >>
              /Priority [0 1]
            /PageSize [600 500]
            /OneWayMedium false
            >> setpagedevice

This selects dictionary 0. However, the subsequent setpagedevice shown below call selects 1:

<< /OneWayMedium true >> setpagedevice

/OneWayMedium is set to true by default in HMR but not in HHR.

MaxPageSize and MinPageSize

MaxPageSize and MinPageSize extensions provide a way for the unrestrained matching provided by /PageSize [0 0] to be combined with limits on the raster size produced; this allows you to select a suitable entry in InputAttributes according to requested size and policy as usual, but the actual raster size generated is then adjusted. If the InputAttributes dictionary matched contains a zero in the PageSize, then the PageSize requested is used: however, if there is a MaxPageSize key in the dictionary selected from InputAttributes, and the PageSize requested exceeds that size, the PageSize used is reduced to the maximum. Similarly if there is a MinPageSize, the size increases to the minimum if it would otherwise be less. For example, if there are no other influencing factors, the following gives a page size of [500 500]:

            /PageSize[500 500]
            /InputAttributes <<
              0 << /PageSize [0 0] >>
            >> setpagedevice

However, the following gives a page size of [400 600]:

            /PageSize[500 500]
              /InputAttributes << 0 <<
              /PageSize [0 0]
              /MaxPageSize [400 800]
              /MinPageSize [400 600]
            >> setpagedevice

Consider a drum device that feeds media from a continuous roll from the side (with respect to scan direction). Many designs do not require a full drum’s worth of film to be loaded, but clearly they cannot accommodate more than the width of the drum. MaxPageSize allows the arbitrary sizes of page that such devices can support while needing some measure of constraint.

RasterBBox, RasterDeviceBBox

You can use the /RasterBBox and /RasterDeviceBBox keys in an InputAttributes dictionary to generate a raster of exactly the specified size; this allows the raster to include padding or exclude unprintable areas required for mechanical transportation.

Jobs are matched to dictionaries according to /PageSize but then clipped or padded according to RasterBBox or RasterDeviceBBox, if present. If RasterBBox or RasterDeviceBBox are present in a media matching dictionary, the PageSize request only matches in the orientation specified, and not in a rotated orientation, as if OneWayMedium had been set to true. PageSize policy 8 behaves like policy 7 (no scaling) if RasterBBox or RasterDeviceBBox are matched to set an explicit raster size.

Both take as values an array of four numbers [x1, y1, x2, y2] that specify the bottom-left and top-right corners of the required raster. All marks on the page are clipped to this bounding box; the raster is padded out with zeros, if necessary, to fill up the bounding box. RasterBBox is specified in default user units (1/72 inch) as bottom-left and top-right coordinates. RasterDeviceBBox is specified in device space pixels as top-left and bottom-right coordinates. Neither RasterBBox nor RasterDeviceBBox are affected by Orientation nor Scaling.

Only one of RasterBBox or RasterDeviceBBox is applied. If RasterBBox is specified, it takes precedence over RasterDeviceBBox.

RasterBBox/ RasterDeviceBBox may be combined with ImagingBBox (and TileDeviceBBox, if required).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.