pdfGetPageObject
Obtain the opaque page object handle (IPGE) for a page, for
| Exported names | pdfGetPageObject |
|---|---|
| Calling convention | stdcall |
| Thread safety | One PPDF/handle per thread; see V18 §Threading |
| Introduced | LumasPDF 1.0 |
Purpose — Obtain the opaque page object handle (IPGE) for a page, for use with the page-object APIs.
Description — Looks the page up by its 1-based number in the document's page list and returns a pointer-sized handle identifying that page object. The handle stays valid for the life of the page (it is invalidated by deleting the page or the document) and is what the IPGE-taking functions such as pdfGetPageOrientation operate on. No state is changed by this call.
Declarations
IPGE __stdcall pdfGetPageObject(PPDF IPDF, uint32_t PageNum);
function pdfGetPageObject(const IPDF: PPDF; PageNum: Cardinal): IPGE; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | In/Out | Description |
|---|---|---|---|
IPDF | PPDF | in | Instance handle with an open document. |
PageNum | Cardinal | in | 1-based page number. |
Return value — The page's IPGE handle, or NULL when the instance handle is invalid or PageNum is out of range (less than 1 or greater than the page count).
See also — pdfDeletePage, pdfDeletePageLGIDict, pdfDeletePageLabels, pdfGetPageBBox, pdfGetPageLGIDictContent, pdfGetPageLGIDictCount, pdfGetPageMetricsToString, pdfSetPageThumbnail
C# (P/Invoke)
public static extern IntPtr pdfGetPageObject(IntPtr IPDF, uint PageNum);
Getters
pdfGetPageObject
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.