0

In a pdf file, in the code behind a button, I have

Run a JavaScript (change some form fields)
Execute a menu item, File->Save
Execute a menu item, File->Exit

The exit command works fine in Phantom PDF (older version, 2.2), but not in Foxit Reader (8.3, pretty recent version). Just nothing is happening there.

I also checked with an old Foxit Reader version, 3.3, and it is working as expected there.

I tried "Security" and "Trust Manager" settings, those don't improve the situation, though.

I want to close the reader when hitting the button.

Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104

1 Answers1

1

This option (both creating and executing) seems to have been removed in new versions of Foxit Reader and Foxit PhantomPDF.

Further to that, although Adobe Acrobat shows "Execute a menu item, File->Exit" as being an available option, it doesn't actually exit the application, just shows you the messagebox below and if you press OK it closes the PDF but leaves Adobe Acrobat open.

enter image description here

It's actually a good thing this doesn't work anymore, the document creator should not be able to trigger the viewing application on the end-users machine to quit. Trigger closing of document maybe, but definitely not the viewing application.

Rowan
  • 2,384
  • 2
  • 21
  • 22
  • 1
    Generally speaking, you may be right. In my case, I used this mechanism to detect when the user is finished with doing changes to a pdf and further processing it. I will accept, since it is the only answer and also what I found elsewhere: both Acrobat and Foxit removed it a few years ago already. – Andreas Reiff Aug 04 '17 at 05:59