THPDFLayoutDiagnostic Record

One structured layout event: what happened and why, the page and rectangle involved, line counts, element paths, and the optional source-code location of the element

Declaration

THPDFLayoutDiagnostic= record
  Kind: THPDFLayoutDiagnosticKind;
  PageIndex: Integer;
  RelatedPageIndex: Integer;
  X: Single;
  Y: Single;
  Width: Single;
  Height: Single;
  LineCount: Integer;
  Reason: AnsiString;
  ElementPath: AnsiString;
  RelatedElementPath: AnsiString;
  SourceFile: AnsiString;
  SourceLine: Integer;
  SourceColumn: Integer;
end;

Unit

HPDFDoc

Fields

FieldPurpose
KindTHPDFLayoutDiagnosticKind event type, such as ldkAutomaticPageBreak or ldkKeepWithNext
PageIndexZero-based page the event occurred on
RelatedPageIndexPaired page for cross-page events such as an element splitting onto the next page
X / Y / Width / HeightPlacement rectangle involved in the event, in the same terms as THPDFLayoutBounds
LineCountNumber of text lines involved, for example the lines laid out before an automatic break
ReasonHuman-readable explanation of why the event was recorded
ElementPathPath of the layout element the event belongs to
RelatedElementPathPath of the paired element for overlap and split events
SourceFile / SourceLine / SourceColumnDeclaration site captured through SetDiagnosticSource when source-location capture is enabled

Usage notes

Related APIs