PXCV_GetPageDimensions

<< Click to Display Table of Contents >>

Navigation:  Functions >

PXCV_GetPageDimensions


 

pdf-xchange-editor-simple-sdk_100x100 PXCV_GetPageDimensions

 


 

PXCV_GetPageDimensions retrieves page dimensions in points.

 

HRESULT PXCV_GetPageDimensions(

PXVDocument Doc,

DWORD page_num,

doublewidth,

doubleheight

);

 

Parameters

 

Doc

[in] Specifies a document that PXCV_Init created.

 

page_num

[in] Specifies the zero-based page number for which to retrieve dimensions.

 

width

[out] Pointer to a double variable that receives the width of the page. The measurement returned is the width (in points) of the crop box.

 

height

[out] Pointer to a double variable that receives the height of the page. The measurement returned is the height (in points) of the crop box.

 

Please note that all functions and parameters are case-sensitive.

 

Return Values

 

If the function fails then the return value is an error code.

 

If the function succeeds then the return value is DS_OK, or a different value that isn't an error code.

 

Example (C++)

 

HRESULT GetPageDimInPixels(PXVDocument pDocDWORD page_numDWORD dpiSIZEdims)

{

double pwph;

HRESULT hr = PXCV_GetPageDimensions(pDocpage_num, &pw, &ph);

if (IS_DS_SUCCESSFUL(hr))

{

dims.cx = (LONG)(pw * dpi / 72.0 + 0.5);

dims.cy = (LONG)(ph * dpi / 72.0 + 0.5);

}

return hr;

}