Possible Bug In Split Page Modal Popup

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.
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Possible Bug In Split Page Modal Popup

Post by plgoldman »

In doing testing with "cmd.document.splitpages" everything works fine if I click on the "OK" button in the modal popup. However, if I hit the "Enter" key on the keyboard, which appears to have focus on the "OK" in the modal popup, rather than executing the splitpage operation as happens when I click on "OK" the page displayed in the modal popup moves to the next page and nothing else happens. The behavior suggests that the focus has remained on the "Split Page" button I have on the application's main window.

Hitting the enter key on the other two commands I use which produce modal popus, "crop page" and "duplicate page," works as expected - the results are identical to clicking on the "OK" button.

Regards,
Paul
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8618
Joined: Wed Jan 03, 2018 6:52 pm

Re: Possible Bug In Split Page Modal Popup

Post by TrackerSupp-Daniel »

Hello Plgoldman,
Can you please verify that you are running V7.0.324.3?
In my version the split pages dialog has the ok button greyed out by default, so I cant even try to hit enter. though when I do I still do not experience the pages behind scrolling.
If you are could you describe the steps to reproduce this behaviour with a little more detail?
Thanks!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

HI Daniel,

Thanks for the quick response. First of all, in response to your question on version number, I am running 7.0.323.1. Evidently not the latest. As to the steps involved.

On the UI of my application I have a button labeled "Page Split." Note - this is a WPF application under MS Windows 10. The start of the "BtnSplit"_Click routine is as follows:

Code: Select all

            SplitPagesEventMonitor mySplitMonitor = new SplitPagesEventMonitor(pdfCtl.Inst.Str2ID("DlgSplitPages"));
            uiInst.CurrentThreadCtx.RegisterEventMonitor(mySplitMonitor);
            pdfCtl.Inst.ExecUICmd("cmd.document.splitPages");
            uiInst.CurrentThreadCtx.UnregisterEventMonitor(mySplitMonitor);
When the split page dialog panel appears the "OK" button is not greyed out by default. By the way, I substituted the above code with the more "standard"

Code: Select all

            var cmndString = uiInst.CmdManager.Cmds.Find("cmd.document.splitPages");
            pdfCtl.Inst.ExecUICmd2(cmndString.ID);
and experienced the same results.

In the mean time I'll download the latest version.

Regards,
Paul
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

Hi Daniel,

Just a follow up. I upgraded to "V 7.0.324.3" and see no difference in behavior.

Just to be more precise in my narrative - when the Split Page window first pops up the "OK" button is greyed out. It is not until I add at least one "split" bar that the "OK" button becomes enabled. That is the way it behaved in "V 7.0.323.1" and it makes perfect sense that it would do so.

Regards,
Paul
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8618
Joined: Wed Jan 03, 2018 6:52 pm

Re: Possible Bug In Split Page Modal Popup

Post by TrackerSupp-Daniel »

Hello Paul,
Am I correct in assuming you are using the SDK while encountering this issue, as even after going through this whole process it seems I am unable to produce an instance where focus is not on the split pages window.
If you are please let me know so I can move this topic to a location the Devs will more readily see it.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

Hi Daniel,

The focus is on the split page window. It also appears the focus is on the OK button on the split page window. However, unlike other modal windows, e.g. Duplicate Page, hitting the Enter key on the keyboard is not equivalent to clicking the OK button. Rather, hitting the Enter key seems to activate the last key to have focus on the application’s main window.

Regards,
Paul
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8618
Joined: Wed Jan 03, 2018 6:52 pm

Re: Possible Bug In Split Page Modal Popup

Post by TrackerSupp-Daniel »

Hello Paul,
I've moved this topic to the SDK forums as I have established you are using the SDK, not the End-User Editor.
In the future please try to post in the correct forum, thank you! :)
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

Hi Daniel,
My apologies. I somehow misdirected myself. I’ve been posting to the SDK forums for a while. I didn’t recognize your name which made me wonder if I did something wrong.

Thanks again,
Paul
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Possible Bug In Split Page Modal Popup

Post by Sasha - Tracker Dev Team »

Hello Paul,

I just tried doing this in the End-User Editor and from the FullDemo application - opened the Split pages dialog, added a line and clicked enter - everything behaved correctly.
The problem should be in your SplitPagesEventMonitor.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

Alex,

As always I appreciate you taking the time to check this issue out. However, my results seem to be different from yours. I took a few minutes to create the simplest possible program to test "cmd.document.splitPages"

"Button1" is used to invoke the "cmd.document.spitPages" command. The document path in the "pdfCtl.OpenDocFromPath" function is redacted for corporate reasons.

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OKButtonFocus_010
{
    public partial class Form1 : Form
    {
        public PDFXEdit.IUIX_Inst uiInst = null;
        public PDFXEdit.PXV_Inst Inst = null;
        public PDFXEdit.IPXC_Inst pxcInst = null;
        public PDFXEdit.IPXC_Document pxcDoc = null;

        public Form1()
        {
            InitializeComponent();

            Inst = new PDFXEdit.PXV_Inst();
            uiInst = (PDFXEdit.IUIX_Inst)pdfCtl.Inst.GetExtension("UIX");
            pxcInst = (PDFXEdit.IPXC_Inst)pdfCtl.Inst.GetExtension("PXC");

            pdfCtl.OpenDocFromPath(@"C:\Users\...........................................................................................................................................\ Final Bookmarked Sample.pdf");

        }

        private void button1_Click(object sender, EventArgs e)
        {
            var cmndString = uiInst.CmdManager.Cmds.Find("cmd.document.splitPages");
            pdfCtl.Inst.ExecUICmd2(cmndString.ID);
        }
    }
}
When the "Split Pages" modal dialog is first displayed the "OK" button is grayed out. As soon as the "Add Horizontal Split," or "Add Vertical Split," icon is clicked the "OK" button is enabled and, based on the fact that it displays a blue border, has the focus. However, unlike other modal dialogs for other functions hitting the keyboard "Enter" key simply advances the document displayed in the modal window to the next page it does not execute the "Split Page" function. Clicking on the "OK" button with the mouse does execute the "Split Page" function and return to the main screen.

Am I incorrect in assuming that hitting the keyboard "Enter" key should produce the same result as clicking on the "OK" button with the mouse?

Regards,
Paul
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup - It looks like it is something at this end

Post by plgoldman »

Alex,

I have to apologize. I don't quite know what is going on with the behavior of both the short program I wrote for split page as well as the proof of concept system I have under development. I started up my PC fresh this morning and for the first time the striking the "Enter" key on the "Split Page" modal had the same effect as clicking on the "OK" button. I know I'm not crazy, at least I'm pretty sure I'm not, but the behavior I reported was observed by myself and several others. I will try to keep track of the usage of the "Split Page" function, i.e. how it's used in conjunction / sequence with other functions to see if I can reproduce it under certain circumstances.

On another note, last Wednesday I demo'd the system I have under development for which the SDK is key to both my corporate CEO and CTO among others. The reactions from them during the demo were "excellent" and "this is very good work." So I'm close to the end of the trial and finally becoming a "real" customer.

Thanks for your support through this process.

Regards,
Paul
plgoldman
User
Posts: 36
Joined: Fri Jan 05, 2018 8:36 pm

Re: Possible Bug In Split Page Modal Popup

Post by plgoldman »

Alex,

Here is how to reproduce the behavior I observed.

1. If you open the split page dialog and click on the "Add Horizontal Split" at the top of the "Preview Page" area you will get a "split" bar across the center of the page. If you do nothing else and hit "Enter," the page will split as expected.

2. If you open the split page dialog and click on the "Add Horizontal Split" at the top of the "Preview Page" area you will get a "split" bar across the center of the page. If you now use your mouse to move the "split" bar up or down on the page and hit "Enter," the "Preview Page" will display the next page and do nothing else. If you then click on any part of the modal page outside of the "Preview Page" area and hit "Enter," the page will split as expected. It would appear that clicking with the mouse inside of the "Preview Page" area causes a loss of focus on the "OK" button.

Regards,
Paul
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Possible Bug In Split Page Modal Popup

Post by Sasha - Tracker Dev Team »

Hello Paul,

Well then the focus is in the Preview Group Control at that moment and the navigator intercepts the Enter click to move to the next page.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ