Object Graph Editing and Page Assembly
HotPDF exposes the complete loaded indirect-object graph for deterministic diagnostics and controlled editing while retaining explicit validation and resource bounds
Graph diagnostics and editing
Stable JSON export orders objects and dictionary keys deterministically and can embed raw or decoded stream payloads or write them to external files
Versioned object graph JSON streams complete snapshots or incremental updates with explicit schema compatibility, binary sidecars, bounded parsing, reference validation, and transactional import
BuildLoadedObjectDependencyGraph returns object-number ordered nodes and reference-slot edges with shallow memory, Catalog reachability, immediate dominators, and retained-memory attribution
Retained bytes use the Catalog-rooted dominator tree, so memory reachable through shared resources is charged only to the nearest object whose removal would make that memory unreachable
Validated JSON patches support typed PDF values and reject invalid paths, references, cycles, base64 payloads, and inconsistent stream lengths before committing changes
Object streams can be inspected as raw filtered bytes or decoded bytes without materializing unrelated compressed members
Linearization validation checks the primary dictionary, first-page section, main cross-reference location, page-offset hints, and shared-object hints under caller-selected bounds
Reproducibility and reachability
ReproducibleOutput derives document identifiers from canonical serialized content, enables deterministic dictionary ordering, and avoids unchanged-file fast copying
Unreachable indirect objects can be preserved, reported, or removed after a traversal rooted at the trailer and loaded document graph
Page workflows
Collated assembly reads multiple source documents in bounded chunks with an explicit maximum open-file count
Overlay and underlay ranges use independent stop, repeat, clamp, or reverse page-cycle policies
Rotation flattening transforms content, page boxes, annotations, destinations, and structure geometry before clearing page rotation
Page thumbnails can be read raw or decoded, replaced, and invalidated with rendered-page cache changes
Primary APIs
THotPDF.ExportLoadedObjectGraphJSONTHotPDF.ExportLoadedObjectGraphJSONToStreamTHotPDF.ImportLoadedObjectGraphJSONTHotPDF.BuildLoadedObjectDependencyGraphTHotPDF.ApplyLoadedObjectGraphJSONPatchTHotPDF.InspectLoadedObjectStreamTHotPDF.ValidateLinearizedSourceTHotPDF.ReproducibleOutputTHotPDF.ApplyUnreachableObjectPolicyTHotPDF.AssembleCollatedPagesTHotPDF.ComposeLoadedPageRangesTHotPDF.FlattenLoadedPageRotationTHotPDF.ReadLoadedPageThumbnailTHotPDF.SetLoadedPageThumbnailStreamTHotPDF.InvalidateLoadedPageThumbnail