CommitHighlightRegionsToAnnotations

Viewer interaction

Description

Converts every persistent highlight region added with AddHighlightRegion into a real text-markup highlight annotation stored in the document: each region becomes a highlight annotation with quad points over its rectangle, filled with HighlightColor at 80 per cent opacity

After the conversion the on-screen regions are cleared, the annotation appearances of the touched pages are repaired and the affected page bitmaps are invalidated

Syntax

Delphi

Function TPDFlibViewer.CommitHighlightRegionsToAnnotations: Integer;

Return values

The number of regions converted; 0 when no document is open, no region exists, or none could be written

Remarks

The library's selected page and coordinate origin are saved and restored around the edit; regions that fall outside the page or have no extent are skipped

See also

TPDFlibViewer, AddHighlightRegion, ClearHighlightRegions, HighlightRegionCount, HighlightColor