StructTreeItemCount

Tagged PDF, Content Extraction

תיאור

לוקחת snapshot שטוח מסוג depth-first של עץ המבנה של המסמך ומחזירה את מספר ה-structure elements בו

תחביר

Delphi

Function TPDFlib.StructTreeItemCount: Integer;

ערכי החזרה

0המסמך אינו מתויג או שאין לו structure elements
Nמספר ה-structure elements ב-snapshot

הערות

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