SetStructElemListNumbering

Tagged PDF, Accessibility

Description

Sets the /ListNumbering attribute (List attribute owner) on the structure element currently open on the tag stack. The value declares the marker or numbering scheme used for items in an L (list) structure element, enabling assistive technology to announce the list type correctly. Equivalent to calling AddTagAttribute with Owner=List, Name=ListNumbering, and the scheme name as the value.

Syntax

Delphi

function TPDFlib.SetStructElemListNumbering(const Numbering: WideString): Integer;

ActiveX

Function PDFlib::SetStructElemListNumbering(Numbering As String) As Long

DLL

int DLSetStructElemListNumbering(int InstanceID, wchar_t * Numbering);

Parameters

NumberingThe list numbering scheme. Must be one of the following values (case-sensitive):

None — no visible marker (default when attribute is absent)
Disc — filled circle (•)
Circle — open circle (○)
Square — filled square (■)
Decimal — 1, 2, 3 …
UpperRoman — I, II, III …
LowerRoman — i, ii, iii …
UpperAlpha — A, B, C …
LowerAlpha — a, b, c …

Return value

Returns 1 on success. Returns 0 if no document is open or no tag is currently open on the tag stack.

Remarks

Call this function after BeginTag with tag type L (list) and before EndTag. The /ListNumbering attribute is defined in ISO 32000-1 §14.8.5.3.2 (List attribute owner, Table 336).

The attribute applies to the containing L element, not to individual LI items. Set it once on the L element immediately after opening it. The attribute is advisory: it tells assistive technology what kind of list this is so it can announce "bullet list", "numbered list", and so on — regardless of what visual marker glyphs were actually drawn by the PDF renderer.

When a list has no explicit numbering system (for example, a series of terms without visual bullets), use None or omit the attribute entirely.

Example

// An ordered decimal list
PDFlib.BeginTag('L', '', '', '');
PDFlib.SetStructElemListNumbering('Decimal');

  PDFlib.BeginTag('LI', '', '', '');
    PDFlib.BeginTag('Lbl', '', '', '');
    PDFlib.DrawText('1.', 72, 700);
    PDFlib.EndTag;
    PDFlib.BeginTag('LBody', '', '', '');
    PDFlib.DrawText('First item', 90, 700);
    PDFlib.EndTag;
  PDFlib.EndTag;

  PDFlib.BeginTag('LI', '', '', '');
    PDFlib.BeginTag('Lbl', '', '', '');
    PDFlib.DrawText('2.', 72, 680);
    PDFlib.EndTag;
    PDFlib.BeginTag('LBody', '', '', '');
    PDFlib.DrawText('Second item', 90, 680);
    PDFlib.EndTag;
  PDFlib.EndTag;

PDFlib.EndTag; // L

See also

SetStructElemExpansion, AddTagAttribute, BeginTag, EndTag, GetPDFUADiagnostics