Foxit PDF SDK ActiveX

How to use the OnShowSavePrompt?

To use the OnShowSavePrompt function in Foxit PDF SDK ActiveX,  follow the guidelines below:

Setting bShow=false will disable the prompt when closing the ActiveX.

Setting the following will control how the PDF is handled without the prompt.

// nResult=0 is not to save.
// nResult=1 is to save.
// nResult=6 no setting has been set.

private void axFoxitPDFSDK1_OnShowSavePrompt(object sender, AxFoxitPDFSDKProLib._DFoxitPDFSDKEvents_OnShowSavePromptEvent e){
    e.bShow = false;
nResult=0 
}

Note: To disable the prompt from showing when a control like a form control, the application must check the form event before it close, and call ActiveX’s CloseFile.

For example, FormClosed event can call ActiveX CloseFile to disable saving or additional prompt.

private void Form1_FormClosed(object sender, FormClosedEventArgs e){
           FoxitActiveXControl.CloseFile();
}

Updated on April 4, 2017

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: