API referenceCore SDK

pdfGetStringListCount

Read back one of several internal named string lists

C
int32_t __stdcall pdfGetStringListCount(PPDF IPDF, int32_t StringListID);
const char* __stdcall pdfGetStringListItemA(PPDF IPDF, int32_t StringListID, int32_t ItemIndex);
const wchar_t* __stdcall pdfGetStringListItemW(PPDF IPDF, int32_t StringListID, int32_t ItemIndex);
Delphi
function pdfGetStringListCount(const IPDF: PPDF; StringListID: Integer): Integer; stdcall;
function pdfGetStringListItemA(const IPDF: PPDF; StringListID, ItemIndex: Integer): PAnsiChar; stdcall;
function pdfGetStringListItemW(const IPDF: PPDF; StringListID, ItemIndex: Integer): PWideChar; stdcall;

Purpose. Read back one of several internal named string lists (resolved via ResolveList(Doc, StringListID) — an opaque ID selecting which specific list, e.g. a Choice field's export values or a similar enumerable string collection produced elsewhere in the ABI; this chapter did not independently enumerate every valid StringListID value).

Parameters.

ParameterDescription
IPDFDocument handle.
StringListIDOpaque selector for which internal string list to read.
ItemIndex0-based index into that list.

Return value. pdfGetStringListCount: the list's item count; 0 if StringListID doesn't resolve. pdfGetStringListItem: the item text (transient buffer), or nil if ItemIndex is out of range.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetStringListCount(IntPtr IPDF, int StringListID);
Area
Core SDK
Category

Getters

Exported names

pdfGetStringListCount

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.