APIDo_​PrintID

Prints the content of the current window.

    GSErrCode ACAPI_Automate (
        APIDo_PrintID,
        API_PrintPars*     printPars
    );

 

Parameters

printPars
[in] Control parameters; optional, if missing, the current defaults will be used

 

Return Values

NoError
The function has completed with success.
APIERR_REFUSEDCMD
The function is called from notification level
APIERR_NOPLAN
No open project
APIERR_BADPARS
printPars contains invalid data

For other common API errors see the API Errors document.

 

Remarks

This function is used to print the content of the current window. This function performs a Print command in the server application.

To get more details on the parametrization refer to the API_PrintPars structure.

It cannot be called from notification level; the command is refused if other addons are running. Calling this function may notify other addons about the event. The caller addon does not get any notification. See the Notification Manager for further details.  

This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.

 

Example


API_PrintPars printPars;
BNZeroMemory (&printPars, sizeof (API_PrintPars));
printPars.grid      = true;
printPars.printArea = PrintArea_CurrentView;
printPars.fixText   = false;
printPars.scale     = 20;

GSErrCode err = ACAPI_Automate (APIDo_PrintID, &printPars, nullptr);
if (err == NoError)
    ACAPI_WriteReport ("APIDo_PrintID ...OK", true);

 

Requirements

Version: API 2.1 or later
Header: APIdefs_Automate.h

 

See Also

API_PrintPars
APIDo_PhotoRenderID, APIEnv_GetPrinterParsID
ACAPI_Automate, API Functions