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, for instance ldkAutomaticPageBreak or ldkKeepWithNext
PageIndexZero-based page upon which the event occurred
RelatedPageIndexPaired page for cross-page events, an element splitting onto the next page for instance
X / Y / Width / HeightPlacement rectangle involved in the event, expressed in the same terms as THPDFLayoutBounds
LineCountNumber of text lines involved, for instance the lines laid out before an automatic break
ReasonHuman-readable account of why the event was recorded
ElementPathPath of the layout element to which the event belongs
RelatedElementPathPath of the paired element in overlap and split events
SourceFile / SourceLine / SourceColumnDeclaration site captured through SetDiagnosticSource when source-location capture has been enabled

Usage notes

Related APIs