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