3 short questions about FindNext and highlight selected text

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

3 short questions about FindNext and highlight selected text

Post by Dorwol »

Hello,

1. question
with "Find" (57636) I can find some text in a pdf. With "FindNext" (32992) i can jump to the next hit.
OK, BUT how can I detect if I'm on the LAST hit in my PDF? Because "FindNext" will always start again on first page - it goes in looping. So is there e.g. a function to get the position (x/y or char-position) of my actualy selected text? If yes, so I can compare it with the x/y-result (char-position) of next "FindNext-hit".

2. question
If I select some text, I can call Highlight (33206) to select it e.g. yellow. But how can I set it back to non highlight (it seems that "Undo" (57643) does not work)? Or is there a command to delete (not only hide) all comments (Highlights) in a opened PDF?

3. question
is there a possibility to jump from one hightlighted-textposition to the next?

Thank you
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2449
Joined: Thu Jun 30, 2005 4:11 pm

Re: 3 short questions about FindNext and highlight selected text

Post by Vasyl - PDF-XChange »

Code: Select all

with "Find" (57636) I can find some text in a pdf. With "FindNext" (32992) i can jump to the next hit.
OK, BUT how can I detect if I'm on the LAST hit in my PDF? Because "FindNext" will always start again on first page - it goes in looping. So is there e.g. a function to get the position (x/y or char-position) of my actualy selected text? If yes, so I can compare it with the x/y-result (char-position) of next "FindNext-hit".
Possible new object Document::<Item>.Selection will be added in the near future, this object will be contain full information about selection.
If I select some text, I can call Highlight (33206) to select it e.g. yellow. But how can I set it back to non highlight (it seems that "Undo" (57643) does not work)? Or is there a command to delete (not only hide) all comments (Highlights) in a opened PDF?
It is impossible in current realization. But we working under 'Undo' operation in this time.
is there a possibility to jump from one hightlighted-textposition to the next?
We planning to add new object in near future also:
Document::<Item>.Pages::<Item>.Annots -
collection of comments (including highlights) for more operations with them, and for obtain more information about them.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.