How to select multi-line text
Hi,
I need to select text that is on several lines. I do not want to generate a PDTextSelect using the PDTextSelectCreateWordHilite method, as it turned out that the word numbers used in this method and the word numbers obtained using PDWordFinder are different. There is a PDDocCreateTextSelect method, which also allows you to generate a PDTextSelect. But there is one problem. I generate a PDTextSelect for one line:
PDTextSelect textSelection;
textSelection = PDDocCreateTextSelect (pdDoc, numPage, & fRect1);
AVDocSetSelection (avDoc, ASAtomFromString ("Text"), (void *) textSelection, true);
Then PDTextSelect for another line:
textSelection = PDDocCreateTextSelect (pdDoc, numPage, & fRect2);
AVDocSetSelection (avDoc, ASAtomFromString ("Text"), (void *) textSelection, true);
When the statement is executed
AVDocShowSelection (avDoc);
Only one line is selected.
Is there any way to solve this problem?
