InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPrintUtils Class Referenceabstract

#include <IPrintUtils.h>

Inheritance diagram for IPrintUtils:
IPMUnknown

Public Types

enum  PrintStage {
  kBeforePrintJobParamsInit = 0, kAfterPrintJobParamsInit, kBeforePrintLoop, kBeginPageEvent,
  kBeforeDrawPageEvent, kBeforeDrawPage, kAfterDrawPageEvent, kEndPageEvent,
  kBeforeDrawGalleyPageEvent, kBeforeDrawGalleyPage, kAfterDrawGalleyPageEvent, kEndPrintingEvent
}
 
enum  { kDefaultIID = IID_IPRINTUTILS }
 

Public Member Functions

virtual bool16 IsCompositeMode (int32 outputMode)=0
 
virtual bool16 IsSeparationMode (int32 outputMode)=0
 
virtual int32 GetDefaultOutputMode (const IPrintDeviceInfo *iPrintDeviceInfo)=0
 
virtual bool16 BleedIsOn (const IPrintData *iPD)=0
 
virtual bool16 MarksAreOn (const IPrintData *iPD)=0
 
virtual PMString GetUsedProfileName (const IPrintData *iPrintData, IDocument *iDocument)=0
 
virtual PMString GetDocumentProfileName (const IPrintData *iPrintData, IDocument *iDocument)=0
 
virtual PMString GetDocumentProfileName (IDocument *iDocument, int32 source)=0
 
virtual PMString GetWorkingProfileName (const IPrintData *iPrintData)=0
 
virtual PMString GetWorkingProfileName (int32 source)=0
 
virtual ICMSProofingQueryICMSProofing (IDocument *iDocument)=0
 
virtual void UpdateInkScreening (IPrintDialogData *iPrintDialogData)=0
 
virtual void InitPrintDataAndInks (IDocument *doc)=0
 
virtual void FixupPrintDataForPub (IDocument *doc)=0
 
virtual void FigureCustomPaperSizeSettings (int32 whichPage, IPrintData *iPrintData, IOutputPages *iOutputPages, PMReal &nWidth, PMReal &nHeight, PMReal &nWidthOffset)=0
 
virtual void ThumbCalculateRowsAndColumns (uint32 thumbsPerPage, PMRect const &pageRect, IPrintData const *iPrintData, uint32 &rows, uint32 &columns)=0
 
virtual bool16 IsDocumentWide (PMRect const &pageRect, IPrintData const *printData)=0
 
virtual bool16 IsPrinterWide (IPrintData const *printData)=0
 
virtual PMReal GetCorrectedTilingOverlap (const IPrintData *iPrintData) const =0
 
virtual bool16 InitializeOutputPages (IDocument *iDoc, IPrintData *iPrintData, IOutputPages *iPrintPages)=0
 
virtual void SetupPSViewPortAttrs (IViewPortAttributes *pAttrs, IPrintData *pConfig, IInkList *iInkList)=0
 
virtual void SetupNonPSViewPortAttrs (IViewPortAttributes *pAttrs, IPrintData *pConfig)=0
 
virtual bool16 InvokePrintSetupServices (PrintStage printStage, IPrintData *iPrintData=nil, IOutputPages *iOutputPages=nil, IPrintJobData *iPrintJobData=nil, int32 *whichPage=nil, PMRect *outputRect=nil, GraphicsData *gd=nil)=0
 
virtual bool16 InvokePrintSetupError (IPrintData *iPrintData, ErrorCode &errorNum, PMString &errComponent, PMString &errText, PMString &errOtherInfo)=0
 
virtual PMReal CalculateImageResolution (IPrintData *pConfig, IInkList *iInkList)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Public Print Utility class

Member Enumeration Documentation

Print event print stages - used in InvokePrintSetupServices method

Member Function Documentation

virtual bool16 IPrintUtils::BleedIsOn (const IPrintDataiPD)
pure virtual

Determine if any bleed is turned on in the given IPrintData

Parameters
iPDIN pointer to IPrintData to query
Returns
kTrue if there is any bleed, kFalse otherwise
See Also
IPrintData
virtual PMReal IPrintUtils::CalculateImageResolution (IPrintDatapConfig,
IInkListiInkList 
)
pure virtual

Determines the image resolution that will be used in the view port attrs for the specified settings. This is the resolution used to downsample the image.

Parameters
pConfigIN IPrintData pointer in use
iInkListIN IInkList pointer in use, only used if printing seps
Returns
PMReal of the image resolution that will be used
virtual void IPrintUtils::FigureCustomPaperSizeSettings (int32 whichPage,
IPrintDataiPrintData,
IOutputPagesiOutputPages,
PMRealnWidth,
PMRealnHeight,
PMRealnWidthOffset 
)
pure virtual

Figure out the width and height and width offset for custom paper size

Parameters
whichPageIN which page to use for calculations
iPrintDataIN IPrintData pointer to use
iOutputPagesIN IOutputPages pointer to use
nWidthOUT PMReal reference to the calculated custom paper size width
nHeightOUT PMReal reference to the calculated custom paper size height
nWidthOffsetOUT PMReal reference to the calculated custom paper size width offset
virtual void IPrintUtils::FixupPrintDataForPub (IDocumentdoc)
pure virtual

Perform a fix-up of IPrintData for the current document. Will set the page orientation setting to match the document, and will determine the best orientation if thumbnails is on and the number of thumbs is 2. Called from the later new document responder, so page setup is done first.

Parameters
docIN pointer to IDocument to update
See Also
IDocument
virtual PMReal IPrintUtils::GetCorrectedTilingOverlap (const IPrintDataiPrintData) const
pure virtual

Check the tiling overlap and reduce it to half of the smallest paper size dimension (width or height) if it is larger. This may not always work for books using Auto custom paper sizes, since the paper size used can change at print time.

Parameters
iPrintDataIN IPrintData pointer to use
Returns
PMReal of the corrected tile overlap
virtual int32 IPrintUtils::GetDefaultOutputMode (const IPrintDeviceInfoiPrintDeviceInfo)
pure virtual

Determine the printer's default color output mode

Parameters
iPrintDeviceInfoIN pointer to IPrintDeviceInfo for the printer
Returns
one of kCompositeGray, kCompositeRGB, kCompositeCMYK defined in IPrintData
See Also
IPrintDeviceInfo IPrintData
virtual PMString IPrintUtils::GetDocumentProfileName (const IPrintDataiPrintData,
IDocumentiDocument 
)
pure virtual

Determine the name of the document profile, based on the selected output mode in the IPrintData and the IDocument settings

Parameters
iPrintDataIN pointer to IPrintData to query
iDocumentIN pointer to IDocument to query
Returns
PMString of the document profile name
See Also
IPrintData IDocument
virtual PMString IPrintUtils::GetDocumentProfileName (IDocumentiDocument,
int32 source 
)
pure virtual

Determine the name of the document profile, based on the given colorspace and the IDocument settings

Parameters
iDocumentIN pointer to IDocument to query
sourceIN source colorspace, either kPMCsCalCMYK or kPMCsCalRGB
Returns
PMString of the document profile name
See Also
IDocument GraphicTypes.h
virtual PMString IPrintUtils::GetUsedProfileName (const IPrintDataiPrintData,
IDocumentiDocument 
)
pure virtual

Determine the name of the profile that will be used, based on whether CMS on/off, and the IPrintData and IDocument settings

Parameters
iPrintDataIN pointer to IPrintData to query
iDocumentIN pointer to IDocument to query
Returns
PMString of the profile name in use
See Also
IPrintData IDocument
virtual PMString IPrintUtils::GetWorkingProfileName (const IPrintDataiPrintData)
pure virtual

Determine the name of the working profile, based on the selected output mode in the IPrintData given

Parameters
iPrintDataIN pointer to IPrintData to query
Returns
PMString of the working profile name
See Also
IPrintData
virtual PMString IPrintUtils::GetWorkingProfileName (int32 source)
pure virtual

Determine the name of the working profile, based on the given colorspace

Parameters
sourceIN source colorspace, either kPMCsCalCMYK or kPMCsCalRGB
Returns
PMString of the working profile name
See Also
GraphicTypes.h
virtual bool16 IPrintUtils::InitializeOutputPages (IDocumentiDoc,
IPrintDataiPrintData,
IOutputPagesiPrintPages 
)
pure virtual

Utility which fills in the specified IOutputPages with the set of pages to print, given the print data, which specifies things like page ranges, whether to print even/odd/all, whether to print master pages, and so on. This function should only be used for non-book printing.

Parameters
iDocIN IDocument pointer to use
iPrintDataIN IPrintData pointer to use
iPrintPagesOUT IOutputPages pointer to fill out
Returns
kTrue if successful, kFalse if error
virtual void IPrintUtils::InitPrintDataAndInks (IDocumentdoc)
pure virtual

Initialize the document's inks from the settings stored in the 'Default' printer style. Will initialize the print/no print state as well as the frequency and angle for the process inks, and the frequency and angles of the spot inks. Called from the new document responder.

Parameters
docIN pointer to IDocument to update
See Also
IDocument
virtual bool16 IPrintUtils::InvokePrintSetupError (IPrintDataiPrintData,
ErrorCode & errorNum,
PMStringerrComponent,
PMStringerrText,
PMStringerrOtherInfo 
)
pure virtual

A utility for calling the error handling method of all the IPrintSetupProviders. See that interface for information on the PrintErrorEvent method.

Parameters
iPrintDataIN IPrintData pointer in use
errorNumIN ErrorCode of the current error
errComponentIN PMString reference of which component detected the error
errTextIN PMString reference of any additional error text
errOtherInfoIN PMString reference of any other error text
Returns
kTrue to set the normal print error, kFalse not to set the internal print error
virtual bool16 IPrintUtils::InvokePrintSetupServices (PrintStage printStage,
IPrintDataiPrintData = nil,
IOutputPagesiOutputPages = nil,
IPrintJobDataiPrintJobData = nil,
int32 * whichPage = nil,
PMRectoutputRect = nil,
GraphicsDatagd = nil 
)
pure virtual

A simplified mechanism for invoking the print setup service calls. This prevents you from having to write code to iterate over the service provider for every different call. It iterates over the service providers, and makes the correct call based on the PrintSetupStage parameter. See IPrintSetupProvider to determine which parameters are required for a given PrintSetupStage.

Parameters
printStageIN current PrintStage, defined above
iPrintDataIN IPrintData pointer in use, or nil
iOutputPagesIN IOutputPages pointer in use, or nil
iPrintJobDataIN IPrintJobData pointer in use, or nil
whichPageIN which page is currently being printed, or nil
outputRectIN PMRect pointer to the current output rect, or nil
gdIN GraphicsData pointer in use, or nil
Returns
kTrue to continue printing, kFalse to stop printing
virtual bool16 IPrintUtils::IsCompositeMode (int32 outputMode)
pure virtual

Determine if printing in a composite (vs. separation) mode

Parameters
outputModeIN the current color output mode
Returns
kTrue if printing composite, kFalse otherwise
virtual bool16 IPrintUtils::IsDocumentWide (PMRect const & pageRect,
IPrintData const * printData 
)
pure virtual

Determine if the document is wide (landscape orientation)

Parameters
pageRectIN PMRect reference to the page size
iPrintDataIN IPrintData pointer to use
Returns
kTrue if the document is wide, kFalse otherwise
virtual bool16 IPrintUtils::IsPrinterWide (IPrintData const * printData)
pure virtual

Determine if the print settings for the page is wide (landscape or rev. landscape orientation)

Parameters
iPrintDataIN IPrintData pointer to use
Returns
kTrue if the print setting for the page is wide, kFalse otherwise
virtual bool16 IPrintUtils::IsSeparationMode (int32 outputMode)
pure virtual

Determine if printing in a separation (vs. composite) mode

Parameters
outputModeIN the current color output mode
Returns
kTrue if printing separations, kFalse otherwise
virtual bool16 IPrintUtils::MarksAreOn (const IPrintDataiPD)
pure virtual

Determine if any page marks are turned on in the given IPrintData

Parameters
iPDIN pointer to IPrintData to query
Returns
kTrue if there are any marks, kFalse otherwise
See Also
IPrintData
virtual ICMSProofing* IPrintUtils::QueryICMSProofing (IDocumentiDocument)
pure virtual

Get the ICMSProofing interface for the given IDocument

Parameters
iDocumentIN pointer to IDocument to use
Returns
ICMSProofing pointer
See Also
ICMSProofing IDocument
virtual void IPrintUtils::SetupNonPSViewPortAttrs (IViewPortAttributespAttrs,
IPrintDatapConfig 
)
pure virtual

Uses the specified print data to configure the specified attributes in a way that is appropriate for printing to a non-PostScript printer.

Parameters
pAttrsOUT IViewPortAttributes pointer initialize
pConfigIN IPrintData pointer to use
virtual void IPrintUtils::SetupPSViewPortAttrs (IViewPortAttributespAttrs,
IPrintDatapConfig,
IInkListiInkList 
)
pure virtual

Uses the specified print data to configure the specified attributes in a way that is appropriate for printing to a PostScript printer.

Parameters
pAttrsOUT IViewPortAttributes pointer initialize
pConfigIN IPrintData pointer to use
iInkListIN IInkList pointer to use
virtual void IPrintUtils::ThumbCalculateRowsAndColumns (uint32 thumbsPerPage,
PMRect const & pageRect,
IPrintData const * iPrintData,
uint32 & rows,
uint32 & columns 
)
pure virtual

Determine number of rows and columns for thumbnails

Parameters
thumbsPerPageIN desired number of thumbnails per page
pageRectIN PMRect reference to the page size
iPrintDataIN IPrintData pointer to use
rowsOUT the calculated number of rows
columnsOUT the calculated number of columns
virtual void IPrintUtils::UpdateInkScreening (IPrintDialogDataiPrintDialogData)
pure virtual

Update the IPrintDialogData settings for process and spot inks from the IPrintData settings (IPrintData retrieved from IPrintDialogData::GetPrintData)

Parameters
iPrintDialogDataIN pointer to IPrintDialogData to use and update
See Also
IPrintDialogData