Rasterizes the given page items to a specified width and height, scaling contents to fit, then saves the results to the specified stream.
settings is an optional dictionary which may include the following values (case-sensitive):
Compression: string, one of 'png', 'jpeg', or 'auto'. Default is 'auto' Downsampling: string, one of 'bicubic' or 'antialiased'. Default is 'bicubic' JPEGQuality: string, one of 'max', 'high', 'med', 'low', 'min'. Default is 'high' RasterizationScale: real, the scale at which to rasterize. Default is 1. IncludeAlpha: bool, if true the raster will have an alpha channel. Default is true ClipItems: bool, if true page items are clipped to their parent's bounds. Default is true FilterToSpread: bool, if true page items outside the spread bounds are omitted. Default is true ImageResolution: uint, the resolution at which to rasterize. Must be between 18 and 600. Default is 72
explicitBounds can be used to override the default bounding box calculation that would normally be used (the plug-in normally uses GetBoundingBoxForItemsInSpreadCoords to make this determination). It is the caller's responsibility to ensure that the bounding box is correct; the plug-in will not attempt to validate it.
- Parameters
| items | The page items to rasterize |
| width | The width of the resulting raster |
| height | The height of the resulting raster |
| explicitBounds | Optional bounding box for page items, in spread coordinates |
| settings | Settings to use during the export |
| out | The stream to which the raster is written |
- Returns
- an ErrorCode describing success or failure of the operation