THPDFLayoutDiagnosticOptions Record
Switches and budgets for layout diagnostics: element-path and source-location capture, overlap detection, overlay drawing and labels, live-preview notifications and tracking limits
Declaration
THPDFLayoutDiagnosticOptions= record
CaptureElementPath: boolean;
CaptureSourceLocation: boolean;
DetectOverlaps: boolean;
DrawOverlays: boolean;
ShowOverlayLabels: boolean;
LivePreview: boolean;
MaxTrackedBounds: Integer;
MaxOverlapComparisons: Int64;
class function Default: THPDFLayoutDiagnosticOptions; static;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
CaptureElementPath | Record the ElementPath string of each diagnostic; default True |
CaptureSourceLocation | Record the source file, line and column attached to the element; by default False |
DetectOverlaps | Track placed rectangles and compare them in pairs for overlaps; by default False |
DrawOverlays | Draw diagnostic rectangles onto the page whilst rendering; by default False |
ShowOverlayLabels | Annotate drawn overlays with their reason text; default True |
LivePreview | Push diagnostic notifications whilst interactive editing is under way; by default False |
MaxTrackedBounds | Maximum number of rectangles retained for tracking and overlap checks; default 4096 |
MaxOverlapComparisons | Maximum pairwise rectangle comparisons per run before detection stops; default 1000000 |
Default | Class function handing back the values listed above |
Usage notes
- Start from
THPDFLayoutDiagnosticOptions.Default, change only the switches you need, and assign it throughTHotPDF.SetLayoutDiagnosticOptionsor theLayoutDiagnosticOptionsproperty - Enable
DetectOverlapsonly around the layout runs you care about: comparisons are bounded byMaxOverlapComparisonsyet still cost time on large documents - Pair
DrawOverlayswithShowOverlayLabelsfor visual debugging, and readTHPDFLayoutDiagnosticStatisticsto see what was tracked, compared and drawn