StructTreeItemCount

Tagged PDF, Content Extraction

Описание

Снимает плоский снимок дерева структуры документа в глубину и возвращает число элементов структуры в нём

Синтаксис

Delphi

Function TPDFlib.StructTreeItemCount: Integer;

Return values

0Документ не тегирован либо не имеет элементов структуры
NЧисло элементов структуры в снимке

Примечания

Every call rebuilds the snapshot, so the item getters always describe the structure tree as it stood at the most recent count. Items are numbered 1 to N in depth-first document order: an element is directly followed by its children. Use GetStructTreeItemText and GetStructTreeItemIntProperty to inspect each item — the read-side counterpart of the BeginTag family for auditing tagged documents, exporting their structure or checking accessibility markup before repairs.

Пример

Count:= PDF.StructTreeItemCount;
for I:= 1 to Count do
  Memo1.Lines.Add(StringOfChar(' ', 2* PDF.GetStructTreeItemIntProperty(I, 6))+
    PDF.GetStructTreeItemText(I, 1));

См. также

GetStructTreeItemText, GetStructTreeItemIntProperty, IsTaggedPDF, GetPDFUADiagnostics