NormalizeStructTree

Tagged PDF, structure repair

תיאור

Canonicalizes every structure child collection as an array, promotes direct structure elements to indirect objects, repairs child /P links, removes invalid scalar kids, and keeps only the first reachable edge when a duplicate or cycle is encountered

תחביר

Delphi

Function TPDFlib.NormalizeStructTree: Integer;

ActiveX

Function PDFlib::NormalizeStructTree() As Long

DLL

int DLNormalizeStructTree(int InstanceID);

ערכים מוחזרים

-1למסמך הנבחר אין עץ מבנה
0העץ כבר היה קנוני
Nהמספר החיובי של קשתות, קיבוצים, הפניות או אובייקטים שקודמו שתוקנו

הערות

The traversal is iterative and linear in the number of reachable structure kids. Numeric MCIDs and valid /MCR or /OBJR dictionaries are preserved in place, so existing page /StructParents and /ParentTree mappings remain valid