GetStructTreeItemText

Tagged PDF, Content Extraction

Описание

Returns a text property of one structure tree snapshot item.

Синтаксис

Delphi

Function TPDFlib.GetStructTreeItemText(Index, InfoID: Integer): WideString;

Параметры

IndexИндекс элемента, начиная с 1, из последнего вызова StructTreeItemCount
InfoID1 the raw structure type (/S); 2 the type resolved through the /RoleMap chain; 3 the title (/T); 4 the alternate description (/Alt); 5 the replacement text (/ActualText); 6 the language (/Lang); 7 the element identifier (/ID); 8 the abbreviation expansion (/E); 9 the structure namespace URI referenced by /NS

Return values

''Индекс вне диапазона либо записи нет
TextЗапрашиваемое значение свойства

Примечания

InfoID 2 follows legacy /RoleMap and PDF 2.0 /RoleMapNS chains for up to 32 hops, so documents that tag content with custom types still report the standard structure type they map to.

Пример

if PDF.GetStructTreeItemText(I, 2)= 'Figure' then
  Alt:= PDF.GetStructTreeItemText(I, 4); // alternate description

См. также

StructTreeItemCount, GetStructTreeItemIntProperty, AddRoleMap