SetStructElemScope
Tagged PDF, Přístupnost
Popis
Sets the /Scope attribute (Table attribute owner) on the structure element currently open on the tag stack. The scope identifies whether a TH (table header) cell applies to a column, a row, or both — required by PDF/UA-1 for tables with header cells. Equivalent to calling AddTagAttribute with Owner=Table, Name=Scope, and the scope name as the value.
Syntaxe
Delphi
Function TPDFlib.SetStructElemScope(Const Scope: WideString): Integer;
ActiveX
Function PDFlib::SetStructElemScope(Scope As String) As Long
DLL
int DLSetStructElemScope(int InstanceID, const wchar_t * Scope);
Parametry
| Scope | Rozsah buňky záhlaví. Musí jít o jednu z následujících hodnot (rozlišují se velká a malá písmena): Column — záhlaví se vztahuje na všechny buňky ve sloupci Row — záhlaví se vztahuje na všechny buňky v řádku Both — záhlaví se vztahuje na sloupec i řádek |
|---|
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 TH) and before EndTag. The /Scope attribute is defined in ISO 32000-1 §14.8.5.7.2 (Table attribute owner).
PDF/UA-1 (ISO 14289-1 §7.10) requires that table header cells clearly associate with their data cells. Providing the /Scope attribute is the recommended mechanism when the table layout allows it.
Příklad
// Tag a column header cell
PDFlib.BeginTag('TH', 'Product Name', '', '');
PDFlib.SetStructElemScope('Column');
PDFlib.DrawText('Product Name', 100, 700);
PDFlib.EndTag;
// Tag a row header cell
PDFlib.BeginTag('TH', 'Row 1', '', '');
PDFlib.SetStructElemScope('Row');
PDFlib.DrawText('Row 1', 72, 680);
PDFlib.EndTag;Viz také
AddTagAttribute, SetStructElemBBox, BeginTag, EndTag, SetPDFUAMode