PMSetUnadjustedPaperRect
Requests a particular paper size, unaffected by rotation, resolution, or scaling.
Declaration
OSStatus PMSetUnadjustedPaperRect (
PMPageFormat pageFormat,
const PMRect *paperRect
);Parameters
- pageFormat:
The page format object whose unadjusted paper rectangle you want to set.
- paperRect:
A pointer to a structure of type
PMRectthat specifies the desired paper size, in points. The coordinates of the upper-left corner of the paper rectangle are specified relative to the page rectangle. See Supporting Printing in Your Carbon Application for more information on page and paper rectangles.
Return Value
A result code. See Result Codes. The result code kPMValueOutOfRange indicates that the printer driver does not support the requested page size.
Overview
This function is not recommended. You should call this function only if your application provides desktop publishing and the Page Setup dialog does not provide sufficient control. Typically, such applications display their own specialized document format dialog.
If you decide to use this function, you must call it between the creation and release of a printing session. After using the function PMSetUnadjustedPaperRect you should always call PMSessionValidatePageFormat then call PMGetUnadjustedPaperRect to verify that the paper size you set is recorded by the printer driver.
If you call this function after initiating a print job, the change is ignored for the current job.