IXpsOMPageReference::SetAdvisoryPageDimensions method
Sets the suggested dimensions of the page.
Syntax
HRESULT SetAdvisoryPageDimensions(
[in] const XPS_SIZE *pageDimensions
);
Parameters
pageDimensions [in]
The suggested dimensions to be set for the page.The height and width members must have the value of –1.0 or a value that is greater than or equal to +1.0.
Size is described in XPS units. There are 96 XPS units per inch. For example, the dimensions of an 8.5" by 11.0" page are 816 by 1,056 XPS units.
Return value
If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.
Return code | Description |
---|---|
S_OK | The method succeeded. |
E_POINTER | Either pageDimensions is NULL or a field in the XPS_SIZE structure that is referenced by pageDimensions contains a value that is not valid. |
XPS_E_INVALID_PAGE_SIZE | The advisory page size described in pageDimensions was not valid. The height and width members of pageDimensions must have the value of –1.0 or a value that is greater than or equal to +1.0. |
Remarks
The height and width members of the XPS_SIZE structure that is referenced by pageDimensions must have values that are greater than or equal to +1.0, if those fields' values are to be set, or –1.0 if not. For example, if an advisory dimension were to be set just for the page width, pageDimensions.width would have the desired value and pageDimensions.height would have the value of –1.0.
Requirements
Minimum supported client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps] |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps] |
Header |
Xpsobjectmodel.h |
IDL |
XpsObjectModel.idl |