Hello,
with custom command handler i handle command open, here only click on button. In this way i need handle open from recent file list. How can i catch this command?
Best Regards,
edvschu
get handling open from recent file list
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.
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.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: get handling open from recent file list
Hello edvschu,
Well there is no way to distinguish that. You can catch the https://sdkhelp.pdf-xchange.com/vie ... oreExecute event and see whether it's an op.openDoc operation to know that the document will be opened.
Cheers,
Alex
Well there is no way to distinguish that. You can catch the https://sdkhelp.pdf-xchange.com/vie ... oreExecute event and see whether it's an op.openDoc operation to know that the document will be opened.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: get handling open from recent file list
Hello Alex,
handle various ways to open pdf by catch op.OpenDoc in beforeExecute event i have already thought.
Catch op.OpenDoc, how do I get the full filename at this point?
handle various ways to open pdf by catch op.OpenDoc in beforeExecute event i have already thought.
Catch op.OpenDoc, how do I get the full filename at this point?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: get handling open from recent file list
Hello edvschu,
From the operation's input of course. Here's the code snipped that I have - you should change the document's opening to your needs.
Cheers,
Alex
From the operation's input of course. Here's the code snipped that I have - you should change the document's opening to your needs.
Code: Select all
PDFXEdit.IOperation oper = (PDFXEdit.IOperation)e.pFrom;
PDFXEdit.ICabNode options = oper.Params.Root["Input"];
PDFXEdit.IAFS_Name name = input.v as PDFXEdit.IAFS_Name;
PDFXEdit.IPXC_Document doc = null;
if (name == null)
{
PDFXEdit.IAFS_File file = input.v as PDFXEdit.IAFS_File;
if (file == null)
{
PDFXEdit.IString str = input.v as PDFXEdit.IString;
if (str != null)
doc = pxcInst.OpenDocumentFrom(str, null);
}
else
{
doc = pxcInst.OpenDocumentFrom(file, null);
}
}
else
{
doc = pxcInst.OpenDocumentFrom(name, null);
}
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: get handling open from recent file list
That helps me further. Thank you Alex.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: get handling open from recent file list
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: get handling open from recent file list
I have noticed that doc.id at point catch op.OpenDoc is not the same after the process is completed.
Let me see the doc.id in event document.viewingStarted, it is another. How can this be explained?
Let me see the doc.id in event document.viewingStarted, it is another. How can this be explained?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: get handling open from recent file list
Hello edvschu,
You don't need the IPXC_Document from my sample - you should extract data from the IAFS_Name, IAFS_File or IString directly. The id is different because the operation itself executes and opens the document again.
Cheers,
Alex
You don't need the IPXC_Document from my sample - you should extract data from the IAFS_Name, IAFS_File or IString directly. The id is different because the operation itself executes and opens the document again.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ