A print provider's GetJobAttributesEx function obtains information about a print job, including N-up and reverse printing options.
BOOL GetJobAttributesEx( _In_ LPWSTR pPrinterName, _In_ LPDEVMODEW pDevmode, _In_ DWORD dwLevel, _Out_ LPBYTE pAttributeInfo, _In_ DWORD nSize, _In_ DWORD dwFlags );
- pPrinterName [in]
Caller-supplied pointer to a NULL-terminated Unicode string that contains the printer name.
- pDevmode [in]
Caller-supplied pointer to a DEVMODEW structure that is passed to the print processor or printer driver.
- dwLevel [in]
Caller-supplied value that indicates the type of structure pointed to by pAttributeInfo, as indicated in the following table. For more information, see Remarks.
dwLevel Value Structure pointed to by pAttributeInfo
- pAttributeInfo [out]
- nSize [in]
Size of the buffer, in bytes, pointed to by pAttributeInfo.
- dwFlags [in]
If set by the caller to FILL_WITH_DEFAULTS, then the spooler will fill pAttributeInfo with default values from level 1 up to the level specified by dwLevel.
For example, if dwLevel is 4 and FILL_WITH_DEFAULTS is specified, pAttributeInfo will be filled with the following default member values of ATTRIBUTE_INFO_4:
dwJobNumberOfPagesPerSide = 1
dwDrvNumberOfPagesPerSide = 1
dwNupBorderFlags = 0
dwJobPageOrderFlags = 0
dwDrvPageOrderFlags = 0
dwJobNumberOfCopies = dmCopies member of DEVMODEW
dwDrvNumberOfCopies = dmCopies member of DEVMODEW
dwColorOptimization = 0
dmPrintQuality = dmPrintQuality member of DEVMODEW
dmYResolution = dmYResolution member of DEVMODEW
dwNupDirection = RIGHT_THEN_DOWN
dwBookletFlags = BOOKLET_EDGE_LEFT
dwDuplexFlags = 0
dwScalingPercentX = 100
dwScalingPercentY = 100
dwJobHandlingFlags = 0
GetJobAttributesEx returns TRUE if it is successful in obtaining the print job attributes; otherwise, it returns FALSE.
This function first checks whether the driver supports the attribute level that is indicated by dwLevel. If the driver does not support that attribute level, then the function queries the driver for support for the next lower level, (dwLevel - 1), and continues to query for progressively lower levels of support until it obtains the level of support provided by the driver. If dwFlags is set to FILL_WITH_DEFAULTS, then the function fills in the default values for the unsupported levels.
|This function is available in the Windows Vista operating system.|