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 LongDLL
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