![]() |
![]() |
The CIPrint interface retrieves or modifies the publication settings in the Print dialog box.
The CIPrint methods access three areas; document settings, paper settings, and color settings. All of the methods require you to create the structure that will be used before calling the method. The structures, PMPrintDocParms, PMPrintPaperParms, and PMPrintColorParms can be found in the CIPrint.h file
PMXErr GetPrintDocParms( PMPrintDocParms *pDoc );
PageMaker will fill in a PMPrintDocParms structure with the document settings from the current publication, you need to pass in a pointer to a structure that is already declared.
PMXErr SetPrintDocParms( PMPrintDocParms *pDoc );
Sets the document settings for the current publication to the values in the PMPrintDocParms structure.
PMXErr GetPrintPaperParms( PMPrintPaperParms *pPaper);
Fills a PMPrintPaperParms structure with the paper settings from the current publication, the caller passes in a pointer to a structure that it has created. The paper settings are in the 'paper' panel, within the Print dialog box.
PMXErr SetPrintPaperParms( PMPrintPaperParms *pPaper);
Sets the paper settings for the current publication according to the values in the PMPrintPaperParms structure.
PMXErr GetPrintColorParms( PMPrintColorParms *pColor);
Fills a PMPrintColorParms structure with the color settings from the current publication, the caller passes in a pointer to a structure that it has created.
PMXErr SetPrintColorParms( PMPrintColorParms *pColor);
Sets the color settings for the current publication to the values indicated in the PMPrintColor structure.
The following code retrieves the document settings for the current publication, and then regardless of the settings, turns 'Book' printing on. This example uses sPMMessage as a pointer to the PMMessage structure that is passed into the plug-in by the PageMaker application.
// The PMPrintDocParms must be declared before any
// of the methods can be used.
PMPrintDocParms myDoc;
CIPrint *printInterfacePtr;
PMXErr errReturn;
sPMMessage->pInterfaceMgr->AcquirePMInterface( PMIID_PRINT, &printInterfacePtr );//GetPrintDocParms fills in the PMPrintDocParms structure.
errReturn = printInterfacePtr->GetPrintDocParms( &myDoc );
if ( errReturn )
throw errReturn;
// The only parameter we want to change is 'book' printing.myDoc.book = TRUE;
errReturn = pInterfacePtr->SetPrintDocParms( &myDoc );
// Releasing the interface releases resources within the application.sPMMessage->pInterfaceMgr->ReleasePMInterface( printInterfacePtr );
![]() |
Comments or suggestions? Contact Adobe Developer Support Copyright © 1997 - 2001 Adobe Systems Incorporated. All
rights reserved. |