CurrentPage property does not get changed

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, 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.
Post Reply
mash_inc
User
Posts: 37
Joined: Tue Jan 25, 2011 3:11 pm
Location: Germany
Contact:

CurrentPage property does not get changed

Post by mash_inc »

Hi Alex,

if I have a zoom value where several documents get displayed at the same time, the Editor.CurrentPage property does not get changed when I click on a certain document (Handtool).
Not even when I add annotations on a page.

If I use the GoToPage command to jump to a certain page, the CurrentPage property gets updated nicely, also in the above zoom mode.

Unfortunately this is not a workarround for me. In my scenario I want to insert an Image (programatically) after the current/selected page.

Thanks in advance,

Best regads
Tino
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: CurrentPage property does not get changed

Post by Sasha - Tracker Dev Team »

Hello Tino,

The Current Page property is taken from the active PagesView - I don't see why are you experiencing a problem here. Can you please provide a sample for this behavior?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mash_inc
User
Posts: 37
Joined: Tue Jan 25, 2011 3:11 pm
Location: Germany
Contact:

Re: CurrentPage property does not get changed

Post by mash_inc »

Hi Alex,

please take a look at the provided Video (https://onedrive.live.com/?id=5E93A6A62 ... A622DFFE84).

For my understanding CurrentPage should be changed if the user clicks oder edits a certain page.
Or is there another property that I should use in this case?

Best regards
Tino
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: CurrentPage property does not get changed

Post by Sasha - Tracker Dev Team »

Hello Tino,

I see what you mean now. The current page is calculated based on the page position in the pages view, not the click by hand tool or the annotations' add position. You can obtain the information about those based on what you need - please provide more detailed description at this part.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mash_inc
User
Posts: 37
Joined: Tue Jan 25, 2011 3:11 pm
Location: Germany
Contact:

Re: CurrentPage property does not get changed

Post by mash_inc »

Hi Alex,

In our application we have a command with which you can take a photo with the integrated camera. This photo should automatically be added on a new page after the "current page". This works fine, if the user scrolls to the desired page. But it does not work reasonable if he is in a zoom mode where multiple pages are visible, because it not obvious what the current page is.

Is there something like "Selected Page"?

Best regards
Tino
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: CurrentPage property does not get changed

Post by Sasha - Tracker Dev Team »

Hello Tino,

The selected page term can only be applied to the thumbnail page selection. If you want to know the page that the cursor is over at this moment, then you will have to implement a custom event handler for the Pages View's object and listen to the WM_MOUSEMOVE event. Here's a sample on this one:
https://gist.github.com/Polaringu/f3de7 ... 65695e364c
Then you will have a point in Pages View's coordinate system that you will have to check. Then check out this topic:
https://forum.pdf-xchange.com/ ... 45#p102840

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mash_inc
User
Posts: 37
Joined: Tue Jan 25, 2011 3:11 pm
Location: Germany
Contact:

Re: CurrentPage property does not get changed

Post by mash_inc »

Hi Alex,

thank you for the sample. I will try that.

Best regards,
Tino
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: CurrentPage property does not get changed

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply