InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Facade::IDigitalPublishingRasterizerFacade Class Referenceabstract
Inheritance diagram for Facade::IDigitalPublishingRasterizerFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDIGITALPUBLISHINGRASTERIZERFACADE }
 

Public Member Functions

virtual void GetBoundingBoxForItemsInSpreadCoords (UIDList const &items, PMRect &bounds) const =0
 
virtual ErrorCode RasterizePageitemsToStream (UIDList const &items, uint32 width, uint32 height, PMRect const *explicitBounds, id_digpub::ObjectPtr const &settings, IPMStream *out)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual void Facade::IDigitalPublishingRasterizerFacade::GetBoundingBoxForItemsInSpreadCoords (UIDList const & items,
PMRectbounds 
) const
pure virtual

Calculates the bounding box for a list of UIDs, in spread coordinates, using the same method used internally by RasterizePageitemToStream. This ensures that bounding boxes can be calculated consistently.

Parameters
itemsThe page items to rasterize
boundsOut param to receive the calculated bounds, in spread coordinates
virtual ErrorCode Facade::IDigitalPublishingRasterizerFacade::RasterizePageitemsToStream (UIDList const & items,
uint32 width,
uint32 height,
PMRect const * explicitBounds,
id_digpub::ObjectPtr const & settings,
IPMStreamout 
)
pure virtual

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
itemsThe page items to rasterize
widthThe width of the resulting raster
heightThe height of the resulting raster
explicitBoundsOptional bounding box for page items, in spread coordinates
settingsSettings to use during the export
outThe stream to which the raster is written
Returns
an ErrorCode describing success or failure of the operation