API referenceImages

pdfGetImageObjCount

Return the total number of images registered in the current

C
int32_t __stdcall pdfGetImageObjCount(PPDF IPDF);
Delphi
function pdfGetImageObjCount(const IPDF: PPDF): Integer; stdcall;

Purpose. Return the total number of images registered in the current document (via any insertion path — file, buffer, raw, or staged).

Description. Returns D.ImageCount (FImageCount) directly — this counts every entry ever added to FImages, including ones inserted via pdfCreateImage but never placed on a page, and ones whose visible content was later overwritten via pdfReplaceImage (Image Insertion and Replacement) — since there is no delete operation, this count never decreases within a document's lifetime.

Parameters.

ParameterDescription
IPDFDocument handle.

Return value. The current image count; 0 if IPDF is invalid or no images have been added.

See also. pdfGetImageCount (a different, file-scanning counterpart — do not confuse the two).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetImageObjCount(IntPtr IPDF);
Area
Images
Category

Getters

Exported names

pdfGetImageObjCount

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.