Split command is only executed in one instance if there are two instances  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
AnMuWK
User
Posts: 30
Joined: Thu Dec 19, 2019 2:20 pm

Split command is only executed in one instance if there are two instances

Post by AnMuWK »

Hi,
if I create two instances of the PDFXEdit control and send to both instances the split command (e.g. "cmd.window.split.vert").
Only in one control the document is splitted and the other isn't. What can I do to ensure that both documents are splited?

[...]
windowsFormsHost_Main.Child = new AxPDFXEdit.AxPXV_Control();
windowsFormsHost_Right.Child = new AxPDFXEdit.AxPXV_Control();

((AxPDFXEdit.AxPXV_Control)windowsFormsHost_Main.Child).OpenDocFromPath(@"C:\temp\1.pdf");
((AxPDFXEdit.AxPXV_Control)windowsFormsHost_Right.Child).OpenDocFromPath(@"C:\temp\2pdf");

((AxPDFXEdit.AxPXV_Control)windowsFormsHost_Main.Child).Inst.ExecUICmd("cmd.window.split.vert");
((AxPDFXEdit.AxPXV_Control)windowsFormsHost_Right.Child).Inst.ExecUICmd("cmd.window.split.vert"); // Only this document is splitted now
TestPdfEditorWpfApp.zip
(283.58 KiB) Downloaded 48 times
[...]

Attached a sample WPF Project

Thanks for help.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Split command is only executed in one instance if there are two instances  SOLVED

Post by zarkogajic »

Hi AnMuWK,

I have not actually tried, but try to also use the second parameter in the ExecUICmd method, the "pOwner" -> set it to "pxv.Doc.ActiveView.Obj" where "pxv" is AxPDFXEdit.AxPXV_Control.

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

Re: Split command is only executed in one instance if there are two instances

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Thanks for the assistance :)

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