Moving document in viewer, “gabbing hand”

PDF-XChange Viewer SDK
Simple DLL and ActiveX

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan

Post Reply
Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Moving document in viewer, “gabbing hand”

Post by Parps » Tue May 15, 2012 2:14 pm

Hi All,

I would like to make it possible to move a document in de PDF viewer when its scale is not fitting. This may either be done by adding scroll bars or having the possibility to use a “gabbing hand”. Is this possible? I am using PDF-Viewer v2.0 and Clarion 6.3 build 9058.

I prefer to use the grabbing hand. In the examples (pdfvab20.app) there is an option to change the horizontal and vertical scroll in a spin box. I guess I can do something similar by using PDFXCV2.SetOffset and MOUSE X()/MOUSE Y() on the mouse events of the viewer region. So far I got this approach is a bit working.

However before I reinvent the wheel it might be that there is an solution already available. If so can you point me out please?

Best regards,
Koen

Walter-Tracker Supp
User
Posts: 383
Joined: Mon Jun 13, 2011 5:10 pm

Re: Moving document in viewer, “gabbing hand”

Post by Walter-Tracker Supp » Tue May 15, 2012 5:42 pm

Parps wrote:Hi All,

I would like to make it possible to move a document in de PDF viewer when its scale is not fitting. This may either be done by adding scroll bars or having the possibility to use a “gabbing hand”. Is this possible? I am using PDF-Viewer v2.0 and Clarion 6.3 build 9058.

I prefer to use the grabbing hand. In the examples (pdfvab20.app) there is an option to change the horizontal and vertical scroll in a spin box. I guess I can do something similar by using PDFXCV2.SetOffset and MOUSE X()/MOUSE Y() on the mouse events of the viewer region. So far I got this approach is a bit working.

However before I reinvent the wheel it might be that there is an solution already available. If so can you point me out please?

Best regards,
Koen
The hand tool is available in the Active-X Viewer API (as are most, if not all, other functions and tools available in the end user viewer); otherwise if you are using the simple viewer DLL you'll need to implement this functionality yourself.

-Walter

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Moving document in viewer, “gabbing hand”

Post by Tracker - Clarion Support » Tue May 15, 2012 5:46 pm

Hi Koen!

If you were using the ActiveX version of the PDF-Viewer, this would be simple.

However, the Simple DLL version of the PDF-Viewer does not have any of the niceties of the ActiveX version, so the method used in pdfvab20.app with the spin boxes or something like that is all you have. You have to handle the interpretation and redraw of the PDF page yourself.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Re: Moving document in viewer, “gabbing hand”

Post by Parps » Wed May 16, 2012 12:34 pm

Hi Walter and Craig,

Thank you for your answers. It seems that making it work with the simple viewer DLL is reinventing the wheel indeed. I never used the Active-X version because it seemed to be more complex to start with. But this might be a good time considering to switch.

Cheers,
Koen

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Moving document in viewer, “gabbing hand”

Post by Tracker - Clarion Support » Wed May 16, 2012 1:03 pm

Hi Koen!

You may download and test the ActiveX Viewer at no cost from this page:

http://www.tracker-software.com/product ... er-pro-sdk

Please note that demo watermarks will be branded on each output PDF and image page until the ActiveX is licensed.

This URL is for a ClarionLive! webinar I did on how to create a complete PDF-Viewer using the AxctiveX in about 20 minutes.

http://www.clarionlive.com/index.php?op ... &Itemid=76

(Note. The photo on that webpage is not of me. :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply