THPDFViewer Highlights and Marquee Selection

Marks page regions without changing the PDF and converts interactive selections to PDF page coordinates

Declarations

function THPDFViewerModel.AddHighlightRegion(PageIndex: Integer; const PageRect: THPDFRectangle; Color: TColor= clYellow): Integer;
function THPDFViewerModel.RemoveHighlightRegion(Index: Integer): boolean;
procedure THPDFViewerModel.ClearHighlightRegions;

Programmatic highlights

Region.Left:= 72;
Region.Bottom:= 540;
Region.Right:= 240;
Region.Top:= 600;
HighlightIndex:= Viewer.HighlightRegion(0, Region, clLime);

Interactive selection

Viewer.InteractionMode:= vimHighlight;
Viewer.HighlightColor:= clYellow;
Viewer.OnMarqueeSelect:= ViewerMarqueeSelect;

Usage notes