pdfLoadHighlightFile2
Load a highlight file.
int pdfLoadHighlightFile2(PDFViewerHandle viewer, char *fileName,
COLORREF color, COLORREF selectColor, BOOL selectable)
This function reads an XML highlight file (as generated by search
engines like dtSearch).
For each entry in the highlight file, this function creates a
highlighted region - similar to calling pdfAddRegion
with the
specified color
, selectColor
,
and selectable
arguments.
pdfLoadHighlightFile2
returns pdfOk on success, or
an error code on failure.
Note that the highlight file must use character offsets
("<Body units=characters...>
"), not word offsets
("units=words
"). Word offsets are dependent on the
algorithm used to find word boundaries, which makes them somewhat
inconsistent.
C:
pdfLoadHighlightFile(viewer, "c:\test\highlights.xml", RGB(0, 0, 255));