pdfGetImageHeight
Return an image's native pixel dimensions by document handle.
int32_t __stdcall pdfGetImageHeight(PPDF IPDF, uint32_t Handle);
int32_t __stdcall pdfGetImageWidth(PPDF IPDF, uint32_t Handle);
function pdfGetImageHeight(const IPDF: PPDF; Handle: Cardinal): Integer; stdcall;
function pdfGetImageWidth(const IPDF: PPDF; Handle: Cardinal): Integer; stdcall;
Purpose. Return an image's native pixel dimensions by document handle.
Description. Straightforward lookups into the FImages entry's ImgWidth/ImgHeight fields, as decoded at insertion/creation time — not recomputed from any on-page scale factor a pdfPlaceImage/pdfInsertImage call may have applied (those affect only the placement box on a page, not the stored native pixel dimensions this pair reports).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Handle | An existing document image handle. |
Return value. The native pixel width/height; 0 if Handle doesn't resolve.
C# (P/Invoke)
public static extern int pdfGetImageHeight(IntPtr IPDF, uint Handle);
Getters
pdfGetImageHeight
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.