Skip to main content
Participant
October 13, 2016
Question

Close Reader with Java

  • October 13, 2016
  • 5 replies
  • 1210 views

I have several form for our patients to complete.  I am creating an app with a menu that will ask the patient to complete each form.  On the form there is a button that saves the form in a particular location where other software can grab it and perform other actions.

The button also pops and alert message thanking them and letting them know their form was submitted successfully.  At that point i would like to close Reader and go back to the menu of the app i am writing.

App.execmenuitem('Exit"); does not work and i can close the PDF but Reader is still working....

Any thoughts?

This topic has been closed for replies.

5 replies

dean-SCOAuthor
Participant
October 14, 2016

try67 - Correct as per my request i have already tried Execute menu item exit and it does not work.  Any ideas how this can be accomplished...maybe calling on the OS to kill the process?

try67
Community Expert
Community Expert
October 14, 2016

If your app can call shell commands then you can do it, yes. You can use the "taskkill" command for that.

try67
Community Expert
Community Expert
October 13, 2016

Not possible with JavaScript.

JoelGeraci_Datalogics
Participating Frequently
October 13, 2016

Add an additional action to the button after the "Run a JavaScript" action. Select "Execute a menu item" then choose "File>Exit". The users will get a warning but the script will run then the document will close. Assuming your application is still the top level window, they'll be back in your application.

try67
Community Expert
Community Expert
October 13, 2016

Just to clarify: That doesn't close the application, just the file that's currently open.