Scroll so an area is on display

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

AndreaCCS
User
Posts: 51
Joined: Wed Jun 16, 2010 2:54 pm

Scroll so an area is on display

Post by AndreaCCS »

I want to find out if some text selected like this is visible:

// select first 10 characters on first page, and make visible new selection:
DoVerb("Documents[0].Pages[0].Text", "Select", DataIn(0, 10, 1), DataOut, 0);

I need to ensure that the selected characters are visible or scroll the viewer down if they are not.
Andrea
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Scroll so an area is on display

Post by Vasyl - PDF-XChange »

Hi, AndreaCCS.

Code: Select all

DoVerb("Documents[0].Pages[0].Text", "Select", DataIn(0, 10, 1), DataOut, 0);
- if necessary, this function scrolls the page to ensure selection is visible.

Best
Regards.
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.
AndreaCCS
User
Posts: 51
Joined: Wed Jun 16, 2010 2:54 pm

Re: Scroll so an area is on display

Post by AndreaCCS »

Hi originally I thought this was working but if you try and select something near the bottom of the page the viewer doesn't scroll to the show the selected area. Could you confirm it is supposed to scroll the page down.
Andrea
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Scroll so an area is on display

Post by Stefan - PDF-XChange »

Hello AndreaCCS

Yes it is supposed to do it, and atleast in the latest build of the end user version it does, so as you are using the AX SDK it should be doing the same for you.
Please check that you have the latest build files in your project and if you do not - update them accordingly.

Best,
Stefan