Skip to main content
Participant
June 10, 2024
Answered

Intercepting and Cancelling Export in InDesign

  • June 10, 2024
  • 1 reply
  • 472 views

Hi everyone,

I'm developing a plugin for InDesign that includes a pre-export check. If a certain condition is met, I want to display a dialog box prompting the user to confirm or cancel the export.

The functionality works as expected up to the point of user confirmation. I've been unable to find a way to abort the export if the user chooses "Cancel."

Does anyone have experience with interrupting or cancelling the InDesign export process through plugins? Any insights or suggestions would be greatly appreciated!

This topic has been closed for replies.
Correct answer Rahul_Rastogi

try setting ErrorUtils::PMSetGlobalErrorCode to kCancel or kFailure. 

 

Generally, this will cancel or stop the export.

 

- Rahul Rastogi

Adobe InDesign SDK Custom Plugin Architect

1 reply

Rahul_RastogiCorrect answer
Inspiring
June 10, 2024

try setting ErrorUtils::PMSetGlobalErrorCode to kCancel or kFailure. 

 

Generally, this will cancel or stop the export.

 

- Rahul Rastogi

Adobe InDesign SDK Custom Plugin Architect

LRC_UserAuthor
Participant
June 11, 2024

Thank you. I've tried this and it worked.