Jump to page and to position (scrollbar)

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

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

Post Reply
prosozial_schmitt
User
Posts: 52
Joined: Tue Dec 28, 2004 9:49 am

Jump to page and to position (scrollbar)

Post by prosozial_schmitt » Mon Nov 03, 2014 4:09 pm

Hello,

we have our PDF-documents stored in a document management system. These documents are write-protected - so we can view a document with Pdf-XChange Viewer (SDK), but not edit it (stamps, lines, markup-tool...). To edit an existing document our users have to make a new version by check out (which copies it), make their changes and check in the new document.
In this case the displayed document must be closed and the new (same) document must be opend.

Our users want to see the "new" document at the same position as the "old" document. We can get the current page and open the new document and jump to the same page. But our users complains that the position on that page is not the same because they have to scroll to their last position.

Is it possible to get the current position /dimensions and set the new document exactly to the same positions/dimensions?
Is it even possible to get and set the current scollbar positions?

Greetings
Hans-Peter

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13561
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Jump to page and to position (scrollbar)

Post by Tracker Supp-Stefan » Mon Nov 03, 2014 5:17 pm

Hello Hans-Peter,

The Methods you need are:
TranslateScreenPoint to translate the position of a point on the screen to document coordinates.

And MovePointToScreenPoint to position the new document at the same place.

You might also need to capture the zoom (Magnification) used in the original file and match that as well.

Regards,
Stefan

prosozial_schmitt
User
Posts: 52
Joined: Tue Dec 28, 2004 9:49 am

Re: Jump to page and to position (scrollbar)

Post by prosozial_schmitt » Tue Nov 04, 2014 8:06 am

Hello Stefan.

thank you for your quick answer. I'll try this :)

Greetings
Hans-Peter

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13561
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Jump to page and to position (scrollbar)

Post by Tracker Supp-Stefan » Tue Nov 04, 2014 2:26 pm

:)

Post Reply