typedef
struct
_t_PDResTree
*
PDResTree
;
struct
. typedef
struct
_t_PDTextSelect
*
PDTextSelect
;
ASBool
PDTextSelectEnumQuadProc(
void
*
procObj
,
ASInt32
page
,
ASFixedQuad
*
quad
);
procObj | IN/OUT User-supplied data that was passed in the call to PDTextSelectEnumQuads().
|
page | IN/OUT The page on which the text selection is located.
|
quad | IN/OUT The quad being enumerated.
|
ASBool
PDTextSelectEnumRTFTextProc(
void
*
procObj
,
PDFont
font
,
ASFixed
size
,
PDColorValue
color
,
char
*
text
,
ASUns32
rtfCntFlag
,
ASInt32
textLen
);
ASBool
PDTextSelectEnumTextProc(
void
*
procObj
,
PDFont
font
,
ASFixed
size
,
PDColorValue
color
,
char
*
text
,
ASInt32
textLen
);
procObj | IN/OUT User-supplied data that was passed in the call to PDTextSelectEnumText() or PDTextSelectEnumTextUCS().
|
font | IN/OUT The text's font.
|
size | IN/OUT The text's size in points.
|
color | IN/OUT The text's color.
|
text | IN/OUT The text in the current run. This string is not necessarily
NULL -terminated. |
textLen | IN/OUT The number of bytes in text.
|
| |
|
A data structure used to specify a range of text in a text selection.
Use 0
for ofsStart
and ofsEnd
for whole-word selections. Nonzero values for ofsStart
and ofsEnd
are supported by PDText but are currently ignored by the Acrobat viewer's user interface code (which highlights only whole-word selections). If ofsEnd
is 0
, end
is the first word not selected.
| |
A word containing the start of the selection.
| |
A word containing the end of the selection.
| |
An offset into the word at the start of the selection.
| |
An offset into the word at the end of the selection.
| |
|
Creates a text selection from a page and a list of highlights specified as character offsets from the start of the page. Character offsets are a well-defined quantity in the PDF file, and are therefore stable against revisions of the word-finding algorithm, which makes them a good way to isolate yourself from changes in the algorithm.
This method does not highlight the text selection. That occurs when you pass the PDTextSelect returned by this method to AVDocSetSelection().
Note: As is the case with the Acrobat viewer, the text selection is always of whole words, not part of words.
PDTextSelect
PDTextSelectCreatePageHilite(
PDPage
page
,
HiliteEntry
*
hList
,
ASInt32
listLen
);
page | The page on which the highlights appear.
|
hList | A pointer to an array of highlight entries. If the
length field of a HiliteEntry is 0 , the entire word is highlighted. hList should not contain multiple instances of the same highlight; the display appearance is undefined when it does. |
listLen | The number of highlight entries in
hList . |
WFVersion
parameter to PDTextSelectCreatePageHilite(). It is the same as PDTextSelectCreatePageHilite(), but it creates a WordFinder using the specified version number. It is intended to be used by plug-ins that want to do text highlighting with previous versions of the word finder algorithm. PDTextSelect
PDTextSelectCreatePageHiliteEx(
PDPage
page
,
HiliteEntry
*
hList
,
ASInt32
listLen
,
ASInt16
WFVersion
);
page | The page on which the highlights appear.
| ||||||||||
hList | A pointer to an array of highlight entries. If the
length field of a HiliteEntry is 0 , the entire word is highlighted. hList should not contain multiple instances of the same highlight; the display appearance is undefined when it does. | ||||||||||
listLen | The number of highlight entries in
hList . | ||||||||||
WFVersion | The WordFinder version:
|
Creates a text selection from one or more ranges.
This method does not highlight the text selection. That occurs when you pass the PDTextSelect returned by this method to AVDocSetSelection().
PDTextSelect
PDTextSelectCreateRanges(
PDPage
page
,
PDTextSelectRange
range
,
ASInt32
rangeCount
);
page | IN/OUT The page on which the text appears.
|
range | IN/OUT A pointer to an array of ranges that are used to create a text selection. Each array element is a PDTextSelectRange structure.
|
rangeCount | IN/OUT The number of ranges in range.
|
WFVersion
parameter to PDTextSelectCreateRanges(). It is the same as PDTextSelectCreateRanges() but it creates a WordFinder using the specified version number. It is intended to be used by plug-ins that want to do text highlighting with previous versions of the word finder algorithm. PDTextSelect
PDTextSelectCreateRangesEx(
PDPage
page
,
PDTextSelectRange
range
,
ASInt32
rangeCount
,
ASInt16
WFVersion
);
page | IN/OUT The page on which the text appears.
| ||||||||||
range | IN/OUT A pointer to an array of ranges that are used to create a text selection. Each array element is a PDTextSelectRange structure.
| ||||||||||
rangeCount | IN/OUT The number of ranges in range.
| ||||||||||
WFVersion | IN/OUT The WordFinder version:
|
Creates a text selection from a list of highlights specified as word offsets from the start of the page. Word offsets are not well-defined in PDF files, but are calculated by the word-finding algorithm. As a result, word offsets will, in general, differ in different versions of the word-finding algorithm. If you choose to store word offsets, you must also store the version of the word-finding algorithm from which they are obtained using PDWordFinderGetLatestAlgVersion().
This method does not highlight the text selection. That occurs when you pass the PDTextSelect returned by this method to AVDocSetSelection().
PDTextSelect
PDTextSelectCreateWordHilite(
PDPage
page
,
HiliteEntry
*
hList
,
ASInt32
listLen
);
page | The page on which the highlights appear.
|
hList | A pointer to an array of highlight entries.
hList should not contain multiple instances of the same highlight; the display appearance is undefined when it does. |
listLen | The number of highlight entries in
hList . |
WFVersion
parameter to PDTextSelectCreateWordHilite(). PDTextSelect
PDTextSelectCreateWordHiliteEx(
PDPage
page
,
HiliteEntry
*
hList
,
ASInt32
listLen
,
ASInt16
WFVersion
);
page | The page on which the highlights appear.
| ||||||||||
hList | A pointer to an array of highlight entries.
hList should not contain multiple instances of the same highlight; the display appearance is undefined when it does. | ||||||||||
listLen | The number of highlight entries in
hList . | ||||||||||
WFVersion | The WordFinder version:
|
void
PDTextSelectDestroy(
PDTextSelect
text
);
text | IN/OUT The text selection to destroy.
|
proc
is called for each quad. If a word is on a curve it may have a quad for each character, but it may also have two characters per quad. An upright word will have only one quad for all the characters. An upright hyphenated word will have two quads. void
PDTextSelectEnumQuads(
PDTextSelect
text
,
PDTextSelectEnumQuadProc
proc
,
void
*
procObj
);
text | IN/OUT The text selection whose bounding quads are enumerated.
|
proc | IN/OUT A user-supplied callback to call for each quad. Enumeration halts if
proc returns false . |
procObj | IN/OUT A user-supplied data to pass to
proc each time it is called. |
void
PDTextSelectEnumText(
PDTextSelect
text
,
PDTextSelectEnumTextProc
proc
,
void
*
procObj
);
text | IN/OUT The text selection whose strings are enumerated.
|
proc | IN/OUT A user-supplied callback to call for each string in the text object. Enumeration ends if
proc returns false . |
procObj | IN/OUT User-supplied data to pass to
proc each time it is called. |
void
PDTextSelectEnumTextUCS(
PDTextSelect
textP
,
PDTextSelectEnumTextProc
proc
,
void
*
procData
);
textP | IN/OUT The text selection whose strings are enumerated.
|
proc | IN/OUT A user-supplied callback to call for each string in the text object. Enumeration ends if
proc returns false . |
procData | IN/OUT User-supplied data to pass to
proc each time it is called. |
void
PDTextSelectGetBoundingRect(
PDTextSelect
text
,
ASFixedRect
*
boundRectP
);
text | IN/OUT The text selection whose bounding rectangle is determined.
|
boundRectP | IN/OUT (Filled by the method) A pointer to the text selection's bounding rectangle, specified in user space coordinates.
|
ASInt32
PDTextSelectGetPage(
PDTextSelect
text
);
text | IN/OUT The text selection whose page number is obtained.
|
void
PDTextSelectGetRange(
PDTextSelect
textP
,
ASInt32
index
,
PDTextSelectRange
range
);
textP | IN/OUT The text selection from which a range is extracted.
|
index | IN/OUT The index of the range to extract from
textP . |
range | IN/OUT (Filled by the method) A pointer to a structure that contains the specified range.
|
ASInt32
PDTextSelectGetRangeCount(
PDTextSelect
textP
);
textP | IN/OUT The text selection whose range count is obtained.
|