SetStructElemRowSpan
Структурированный PDF, Доступность
Описание
Sets the /RowSpan attribute (Table attribute owner) on the structure element currently open on the tag stack. The value indicates how many rows the current table cell spans. Equivalent to calling AddTagAttribute with Owner=Table, Name=RowSpan, and the integer value as a string.
Синтаксис
Delphi
Function TPDFlib.SetStructElemRowSpan(RowSpan: Integer): Integer;
ActiveX
Function PDFlib::SetStructElemRowSpan(RowSpan As Long) As Long
DLL
int DLSetStructElemRowSpan(int InstanceID, int RowSpan);
Параметры
| RowSpan | На сколько строк распространяется текущая ячейка таблицы; положительное целое. 1 — ячейка занимает ровно одну строку (поведение по умолчанию без RowSpan); значения больше 1 — ячейка на несколько строк |
|---|
Возвращаемое значение
Возвращает 1 в случае успеха, 0 — если документ не открыт или на стеке тегов нет открытого тега
Примечания
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.
Пример
// 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;См. также
SetStructElemColSpan, SetStructElemScope, AddTagAttribute, BeginTag, EndTag