DAGetXRefDiagnostics

Direct access functionality, Diagnostics

Description

Returns the cross-reference and trailer JSON report for a direct-access document handle

Syntax

Delphi

Function TPDFlib.DAGetXRefDiagnostics(FileHandle: Integer; Out Report: WideString): Integer;

Parameters

FileHandleA valid direct-access document handle
ReportReceives the same structural fields as GetXRefDiagnostics, including the configured load policy, compatibility decisions and any Direct Access raw reconstruction

Return values

0The handle is invalid, Report is empty and LastErrorCode is set to 401
1The report was returned

Remarks

The report distinguishes traditional tables, cross-reference streams, hybrid-reference files and revision chains that switch representation

Each section retains its declared offset, effective physical offset, trailer boundary, link source, compatibility flags and parse result

Under PDF_XREF_LOAD_RECOVERY, Direct Access can report recovered top-level objects, compressed object-stream members and synthesized trailer data