Hello again,
we are using the (old/discontinued) PDFXChange viewer in our system and are currently in the process of migrating to the new PDF-XChange Editor. Using the old API, we could execute the following JavaScript to find out information on document position, including pageViewZoom, pageViewX/Y, pageViewBX/Y, pageViewRow and pageViewPageNum:
var result = " ";for (var key in this.viewState) {result = result + key + "=" + this.viewState[key]+ " "; };result;
Is this still possible with the new API?
Thank you very much in advance.
viewState needed SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17820
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: viewState needed
Hello AnKeilha,
I believe all you need is in the PagesLayoutManager interface:
https://sdkhelp.pdf-xchange.com/vi ... outManager
Regards,
Stefan
I believe all you need is in the PagesLayoutManager interface:
https://sdkhelp.pdf-xchange.com/vi ... outManager
Regards,
Stefan
Re: viewState needed
Thank you for your response. We are using the information from viewState to do the following: Given the position of a mouse click, find the exact PDF coordinates the user clicked on (e.g.: (842.0, 595.0) for the very top right corner of a DIN A4 page). Calculating this using the viewState worked pretty well for us in the past, but I am wondering whether there is an easier way to do this.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: viewState needed SOLVED
Hello AnKeilha,
Well this is not a Core API topic - please post in the Editor SDK thread in the future.
As for the topic itself - the IPXV_Control has some of the methods/properties that you can use to extract data that you need:
https://sdkhelp.pdf-xchange.com/vi ... XV_Control
Also, you can use the LayoutManager that Stefan mentioned to get more detailed data. Here's a code snippet on how to get to it:
Also, check the FullDemo application that comes with the SDK - it has the code snippet that you need in the Document Tab:
https://github.com/tracker-software/PDF ... p/FullDemo
Cheers,
Alex
Well this is not a Core API topic - please post in the Editor SDK thread in the future.
As for the topic itself - the IPXV_Control has some of the methods/properties that you can use to extract data that you need:
https://sdkhelp.pdf-xchange.com/vi ... XV_Control
Also, you can use the LayoutManager that Stefan mentioned to get more detailed data. Here's a code snippet on how to get to it:
Code: Select all
pdfCtl.Doc.ActiveView.PagesView.Layout
https://github.com/tracker-software/PDF ... p/FullDemo
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ