Extract document information when opened through drag and drop  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
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Extract document information when opened through drag and drop

Post by pHol »

Hi!

I have search the forum to find an solution to my problems, but I have not find a solution that do what I want.

I have used the following code to enable open documents through drag and drop:

Code: Select all

	pxvInst.Settings["Docs.CanOpenByDrop"].Int = 1;
	pxvInst.FireAppPrefsChanged(PXV_AppPrefsChanges.PXV_AppPrefsChange_Documents);
I want to open a PDF document with drag and drop and use my own password dialog instead of the one in the SDK. If I am correct, the SDK password dialog is shown after the event e.operBeforeExecute and before the event e.operExecuted. I do not understand how this can be done since I can not find any information about the document being opened between these two events. I know about the IPXC_DocAuthCallback and I am using it, but I still need to have a path to the file being opened to use it.

How can I get the file name/file path to a document when the document is being opened with drag and drop and use that name/path before the password dialog is shown?

I hope that I have expressed myself good enough that you might be able to help me?

/Philip
User avatar
Roman - Tracker Supp
Site Admin
Posts: 306
Joined: Sun Nov 21, 2004 3:19 pm

Re: Extract document information when opened through drag and drop

Post by Roman - Tracker Supp »

Hi Philip,

I guess you can use IPXC_Document::SrcInfo.DispFileName or IPXC_Document::SrcInfo.ActualFileName property.
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Re: Extract document information when opened through drag and drop

Post by pHol »

Roman - Tracker Supp wrote:Hi Philip,

I guess you can use IPXC_Document::SrcInfo.DispFileName or IPXC_Document::SrcInfo.ActualFileName property.

Hi Roman!

Yes, that is what I want to use, but the problem of getting the document when that event is fired remains. Somehow the document is detected at this point since the password dialog is shown, but I can not figure out how I can get the document. The SDK/IPXV_Control/MainFrame or what it is can access the document, see that it is password protected and show the password dialog, but how is it doing that and how can I get access to the document at the point when the event e.operBeforeExecute is fired?

Regards,
Philip
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Re: Extract document information when opened through drag and drop  SOLVED

Post by pHol »

Hi again!

I have found a solution by following this post https://www.pdf-xchange.com/forum3 ... ut#p112580

Thanks anyway

Philip
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Extract document information when opened through drag and drop

Post by Tracker Supp-Stefan »

Hi Philip,

Glad to hear that!

Cheers,
Stefan
Post Reply