Abort operation

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.
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Abort operation

Post by pHol »

Hi!

I've looked through the forum and haven't found the answer to this, but is it possible to abort an operation if e.g a requirement is not met in the operBeforeExecute event?
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Abort operation

Post by Sasha - PDF-XChange »

Hello pHol,

Please check this help page:
https://sdkhelp.pdf-xchange.com/vi ... oreExecute

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Re: Abort operation

Post by pHol »

Hi!

If I understand correctly your answer is that I should set the Result parameter to not 0 and to set the Handled parameter to true. This is done already. The Result parameter is 1 and Handled is true.
I'm calling a custom event after this is done and I needed to do that in an new task, to fix the problem I was having...
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Abort operation

Post by Sasha - PDF-XChange »

Hello pHol,

Yes, by setting those parameters to those values, the operation won't be executed further. What problem are you experiencing with this exactly?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Re: Abort operation

Post by pHol »

Hi Alex,

I fixed my issue. Just needed to call the custom event in an new task. I already have the parameters set to abort but before I was calling the event in a new task I got still got the opening document dialog/progress bar window and the UI froze. But using a new task to call my event, the operation is aborted and nothing happens and I can handle my custom event the way I want to
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Abort operation

Post by Sasha - PDF-XChange »

Ah, I see, so the topic is closed then?
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
pHol
User
Posts: 30
Joined: Mon May 08, 2017 9:47 am

Re: Abort operation

Post by pHol »

Yes you can close it if you want to
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Abort operation

Post by Sasha - PDF-XChange »

OK
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ