API referenceCore SDK

pdfSetStructElemID

A/W variant of [pdfSetTagID](#api-pdfsettagid).

CategoryTagged PDF / structure tree
Notesee pdfSetTagID for the duplicate-functionality note

PurposeA/W variant of pdfSetTagID.

Declarations

C
int32_t __stdcall pdfSetStructElemID(PPDF IPDF, const char* ID);
int32_t __stdcall pdfSetStructElemIDA(PPDF IPDF, const char* ID);
int32_t __stdcall pdfSetStructElemIDW(PPDF IPDF, const wchar_t* ID);
Delphi
function pdfSetStructElemIDA(const IPDF: PPDF; ID: PAnsiChar): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetStructElemIDW(const IPDF: PPDF; ID: PWideChar): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
IDstringNew /ID value for the current tag (same target rule as pdfSetTagID).

Return value1 on success, 0 on failure (no structure elements exist yet, or the handle is invalid) — note the Integer return, unlike pdfSetTagID's LongBool.

See alsopdfSetTagID, pdfSetStructElemTitle

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfSetStructElemIDW(IntPtr IPDF, IntPtr ID);
public static extern int pdfSetStructElemID(IntPtr IPDF, IntPtr ID);
public static extern int pdfSetStructElemIDA(IntPtr IPDF, IntPtr ID);
Area
Core SDK
Category

Setters

Exported names

pdfSetStructElemIDW pdfSetStructElemID pdfSetStructElemIDA

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.