SetStructElemListNumbering
Tagged PDF, Přístupnost
Popis
Nastaví atribut /ListNumbering (vlastník atributů List) na právě otevřeném prvku na zásobníku tagů. Hodnota deklaruje schéma odrážek či číslování používané u položek strukturálního prvku L (seznam), takže asistivní technologie správně oznámí typ seznamu. Odpovídá volání AddTagAttribute s Owner=List, Name=ListNumbering a názvem schématu jako hodnotou
Syntaxe
Delphi
Function TPDFlib.SetStructElemListNumbering(Const Numbering: WideString): Integer;
ActiveX
Function PDFlib::SetStructElemListNumbering(Numbering As String) As Long
DLL
int DLSetStructElemListNumbering(int InstanceID, const wchar_t * Numbering);
Parametry
| Numbering | The 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 … |
|---|
Návratová hodnota
Při úspěchu vrací 1. Vrací 0, pokud není otevřený žádný dokument nebo žádný tag v zásobníku tagů
Poznámky
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.
Nemá-li seznam explicitní číslovací systém (například řada pojmů bez vizuálních odrážek), použijte None, nebo atribut úplně vynechte
Příklad
// 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; // LViz také
SetStructElemExpansion, AddTagAttribute, BeginTag, EndTag, GetPDFUADiagnostics