IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)  SOLVED

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
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by zarkogajic »

Hi Support,

I'm trying to mimic what executing "cmd.view.goto.[prev|next]View" does via code and not by executing commands.

I've tried using ipxvDocument.ActiveView.PagesView.Layout.Navigate(PLNavigate_Backward, 0) for an IPXV_Document but it only goes one page back (same for PLNavigate_Forward - goes to next page). There is navigation "history".

Doing "the same" via ExecCmd does work:
InstUI.CmdManager.ExecCmd('cmd.view.goto.prevView', ipxvDocument.ActiveView.PagesView.Obj);

I, actually, need backward/forward to work with IPXV_PagesPreviewCtl.

Executing InstUI.CmdManager.ExecCmd('cmd.view.goto.[prev|next]View', IPXV_PagesPreviewCtl PPC) does nothing.

So:

[Q1] Is view navigation not supported by IPXV_PagesPreviewCtl?

[Q2] How to correctly call Navigate method for an ipxvDoc?


p.s.
If it makes any sense I'm also setting "NavHistory.Global" to false (as I do not want global navigation / only per document)

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

In the IPXV_PagesPreviewCtl interface you have the CurrentPage available that you can set to your liking.
The IPXV_DocumentView gives you the https://sdkhelp.pdf-xchange.com/vi ... _PagesView.
And the IPXV_PagesView has the CurrentPage property that you can modify according to your needs.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by zarkogajic »

Hi Alex,

Thanks, but unfortunately not the answer to my question.

To repeat - and I'm asking specifically about: PLNavigate_Backward and PLNavigate_Forward.

[Q1] Is (view history) navigation not supported by IPXV_PagesPreviewCtl?

[Q2] How to correctly call Navigate method for an ipxvDoc?




-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

The thing is that this is not a PagesPreviewCtl (it's being used for preview - for example Watermarks dialog) - it's just a PagesView. The commands that you are executing are doing the exact same thing as you describe:
image.png
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by zarkogajic »

Hi Alex,

I know PagesView inside MainView/DocumentViewArea is not PagesPreviewCtl.

Please read my post in detail, I have asked two separate questions.

1. For the "standard" pxvDocument.ActiveView.PagesView, having navigation history, Layout.Navigate(PLNavigate_Forward) moves to next (+1) page while PLNavigate_Backward to prev page (-1). Executing InstUI.CmdManager.ExecCmd('cmd.view.goto.prevView', ipxvDocument.ActiveView.PagesView.Obj) does work correctly - goes back to the page in navigation history.

2. For PagesPreviewCtl both above approaches move to next page (+1) / prev page (-1).

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Just checked the inner structure - there are different implementation classes used for the Layout of the PagesPreviewControl and the PagesView. Thus the behavior can differ as the Navigate method is not the same for PLNavigate_Backward and PLNavigate_Forward method. The problem can lie in the Page Layout mode as it differs in code.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)  SOLVED

Post by zarkogajic »

Hi Alex,

Thanks. I'll close the topic and reopen if needed later. For the moment I've found a workaround.

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

IPXV_PagesLayoutManager::Navigate with PLNavigate_Backward/PLNavigate_Forward (and in IPXV_PagesPreviewCtl)

Post by Sasha - Tracker Dev Team »

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