How to retrieve the closing document

PDF-XChange Editor SDK for Developers

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

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.
prasantha
User
Posts: 50
Joined: Fri Jun 24, 2022 8:15 am

How to retrieve the closing document

Post 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
User avatar
Dimitar - PDF-XChange
Site Admin
Posts: 2208
Joined: Mon Jan 15, 2018 9:01 am

Re: How to retrieve the closing document

Post by Dimitar - PDF-XChange »

Hello prasantha,

The file path is visible in the Recents List:


image.png

Regards.
You do not have the required permissions to view the files attached to this post.
prasantha
User
Posts: 50
Joined: Fri Jun 24, 2022 8:15 am

Re: How to retrieve the closing document

Post 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 ?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: How to retrieve the closing document

Post 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
prasantha
User
Posts: 50
Joined: Fri Jun 24, 2022 8:15 am

Re: How to retrieve the closing document

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: How to retrieve the closing document

Post 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...
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.