SetStructElemRowSpan
Tagged PDF, Přístupnost
Popis
Nastaví atribut /RowSpan (vlastník Table) na strukturním elementu aktuálně otevřeném na zásobníku tagů. Hodnota určuje, kolik řádků aktuální buňka tabulky přesahuje. Ekvivalent volání AddTagAttribute s Owner=Table, Name=RowSpan a celočíselnou hodnotou jako řetězcem
Syntaxe
Delphi
Function TPDFlib.SetStructElemRowSpan(RowSpan: Integer): Integer;
ActiveX
Function PDFlib::SetStructElemRowSpan(RowSpan As Long) As Long
DLL
int DLSetStructElemRowSpan(int InstanceID, int RowSpan);
Parametry
| RowSpan | Počet řádků, přes které aktuální buňka tabulky přesahuje. Musí být kladné celé číslo. Hodnota 1 znamená, že buňka zabírá přesně jeden řádek (výchozí chování, když není nastaveno RowSpan). Hodnoty větší než 1 označují buňku přesahující více řádků |
|---|
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 or TD) and before EndTag. The /RowSpan attribute is defined in ISO 32000-1 §14.8.5.7.2 (Table attribute owner, Table 337).
Row-spanning cells appear in tables where a header or data cell needs to stretch vertically across multiple rows — for example, a row header shared by several data rows. Providing the /RowSpan attribute lets assistive technology correctly build the logical grid model of the table.
When a cell also spans multiple columns, use SetStructElemColSpan in combination with this function.
Příklad
// A row header cell spanning two data rows
PDFlib.BeginTag('TH', 'First Quarter', '', '');
PDFlib.SetStructElemScope('Row');
PDFlib.SetStructElemRowSpan(2);
PDFlib.DrawText('First Quarter', 72, 680);
PDFlib.EndTag;Viz také
SetStructElemColSpan, SetStructElemScope, AddTagAttribute, BeginTag, EndTag