pdfGetTemplCount
Total template count; the most-recently-created template's
int32_t __stdcall pdfGetTemplCount(PPDF IPDF);
int32_t __stdcall pdfGetTemplHandle(PPDF IPDF);
double __stdcall pdfGetTemplHeight(PPDF IPDF, int32_t TmplHandle);
double __stdcall pdfGetTemplWidth(PPDF IPDF, int32_t TmplHandle);
function pdfGetTemplCount(const IPDF: PPDF): Integer; stdcall;
function pdfGetTemplHandle(const IPDF: PPDF): Integer; stdcall;
function pdfGetTemplHeight(const IPDF: PPDF; TmplHandle: Integer): Double; stdcall;
function pdfGetTemplWidth(const IPDF: PPDF; TmplHandle: Integer): Double; stdcall;
Purpose. Total template count; the most-recently-created template's handle; a specific template's dimensions.
Description. pdfGetTemplHandle returns a specific, deliberately convention-matched negative error sentinel (-67109019) when no template exists yet, rather than a generic 0/-1 — an explicit source comment confirms this mirrors "dyna['s] no-template error code" exactly, for callers that check against that specific magic number.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
TmplHandle | *(Height/Width only)* Target template handle. |
Return value. pdfGetTemplCount: total count; 0 if IPDF invalid. pdfGetTemplHandle: the most-recent template's handle, or the convention-matched sentinel -67109019 if none exists. pdfGetTemplHeight/ Width: the dimension; 0.0 if TmplHandle doesn't resolve.
C# (P/Invoke)
public static extern int pdfGetTemplCount(IntPtr IPDF);
Getters
pdfGetTemplCount
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.