SetStructElemScope

Tagged PDF, Accessibility

Description

Stelt het /Scope-attribuut (Table-attribuuteigenaar) in op het structuurelement dat momenteel geopend is op de tag-stack; de scope identificeert of een TH (tabelkop)-cel van toepassing is op een kolom, een rij of beide — vereist door PDF/UA-1 voor tabellen met kopcellen; dit is gelijk aan het aanroepen van AddTagAttribute met Owner=Table, Name=Scope en de scopenaam als de waarde

Syntax

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);

Parameters

ScopeHet bereik van de kopcel; moet een van de volgende waarden zijn (hoofdlettergevoelig):

Column — de kop is van toepassing op alle cellen in de kolom
Row — de kop is van toepassing op alle cellen in de rij
Both — de kop is van toepassing op zowel de kolom als de rij

Return value

Retourneert 1 bij succes; retourneert 0 als er geen document open is of als er momenteel geen tag open is op de tag-stack

Remarks

Roep deze functie aan na BeginTag (met tagtype TH) en vóór EndTag; het attribuut /Scope is gedefinieerd 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.

Example

// 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;

See also

AddTagAttribute, SetStructElemBBox, BeginTag, EndTag, SetPDFUAMode