Calculate hit locations in a PDF file to highlight after a search.
File
File: dtsearch.h
Syntax
C++
struct dtsCalcPdfHitRectsJob : public dtsJobBase {
dtsSearchResultsHandle hSearchResults;
int resultsItemIndex;
const char * inputFile;
dtsIntArrayHandle hitRectsArrayHandle;
int dataFormatRequested;
};
Members
|
Members |
Description |
|---|---|
|
dtsSearchResultsHandle hSearchResults; |
The search results containing the PDF file to calculate hit rects for. Use dtsSearchResults.getHandle() to get the handle from a search results object. dtsSearchResults::calcPdfHitRects will set this field. |
|
int resultsItemIndex; |
The item in search results of the PDF file to calculate hit rects for. |
|
const char * inputFile; |
The input PDF file to calculate hit rects for. If the PDF file does not exist on disk under the name returned in search results, set this field to the location where the file can be found. |
|
dtsIntArrayHandle hitRectsArrayHandle; |
An array of hit rectangle data will be returned in this dtsIntArrayHandle. |
|
int dataFormatRequested; |
The format for the data requested (currently must be zero), to allow for future changes if needed. |
Group
Remarks
dtSearch returns hit locations as word offsets after a search. Use dtsCalcPdfHitRectsJob to convert these word offsets to PDF page coordinates. The PDF page coordinates are returned as an array of integers. This data can then be used with dtsFileConvertJob to add hit highlight annotations to a PDF file for display.