Page 1 of 1

How to retrieve the closing document

Posted: Thu Aug 29, 2024 10:55 am
by prasantha
Hi ,
I have opened couple of document in multiple tabs.and when user close an document except the active document , I am trying to access the file path of the document closed(not the active document). ( and document closing). i tried to find any property inside the event parameter at before_closing or document closed events, But I could not find any such property.
Can you please let me know how can i get the closing or closed document file path ? or is it possible to acess the tab index which is going t close or closed at the above events , if so i can retrieve the related document information

Re: How to retrieve the closing document

Posted: Thu Aug 29, 2024 1:41 pm
by Dimitar - PDF-XChange
Hello prasantha,

The file path is visible in the Recents List:


image.png

Regards.

Re: How to retrieve the closing document

Posted: Fri Aug 30, 2024 7:45 am
by prasantha
Hi Dimitar,
I was looking for a code snipet that uses the editor sdk.Can you provide me any property that I can acces at the slosing or closed event ?

Re: How to retrieve the closing document

Posted: Mon Sep 02, 2024 11:08 am
by Stefan - PDF-XChange
Hello prasantha,

You would then probably need to listen for this event:
https://sdkhelp.pdf-xchange.com/view/PX ... eforeClose
And handle the closing of the file including e.g. grabbing it's path as needed!

Kind regards,
Stefan

Re: How to retrieve the closing document

Posted: Mon Sep 02, 2024 11:59 am
by prasantha
Hi ,
Can I know how can I grab the documetn path inside the e.document.beforeClose event.
image.png
None of the parameter include the document path here

Re: How to retrieve the closing document

Posted: Thu Sep 05, 2024 6:15 pm
by Vasyl - PDF-XChange
In your implementation of IEventHandler::OnEvent you need to use the pFrom argument. For e.document.beforeClose event you need to cast it to the IPXV_Document type...