| Category | Tagged PDF / structure tree |
|---|---|
| Note | see pdfSetTagID for the duplicate-functionality note |
Purpose — A/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
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
ID | string | New /ID value for the current tag (same target rule as pdfSetTagID). |
Return value — 1 on success, 0 on failure (no structure elements exist yet, or the handle is invalid) — note the Integer return, unlike pdfSetTagID's LongBool.
See also — pdfSetTagID, 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.