GetObjectByPathCount

Document properties, Content Extraction

Description

Returns the element count of the node a path expression resolves to.

Syntax

Delphi

Function TPDFlib.GetObjectByPathCount(Const Path: WideString): Integer;

Parameters

PathThe path expression (see GetObjectByPath for the grammar).

Return values

-1The path does not resolve.
0The node is a scalar.
NThe array length, or the entry count of a dictionary or stream dictionary.

Example

for I:= 0 to PDF.GetObjectByPathCount('Root/Pages/Kids')- 1 do
  ShowMessage(PDF.GetObjectByPath('Root/Pages/Kids['+ IntToStr(I)+ ']/Type', 2));

See also

GetObjectByPath, GetObjectCount