Skip to main content
Participant
Oct 13, 2016 9:37 PM UTC
Question

Close Reader with Java

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

dean-SCOAuthor
Participant
Oct 14, 2016 4:17 PM UTC

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?

Translate
try67
Community Expert
Community Expert
Oct 14, 2016 4:43 PM UTC

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

Translate
try67
Community Expert
Community Expert
Oct 13, 2016 9:42 PM UTC

Not possible with JavaScript.

Translate
JoelGeraci_Datalogics
Participating Frequently
Oct 13, 2016 10:12 PM UTC

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.

Translate
try67
Community Expert
Community Expert
Oct 13, 2016 11:04 PM UTC

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

Translate