Highlighted

Close both the PDF and Acrobat Reader from Javascript

Avatar

17-07-2008

Hello,

I'm working on a C++ project which at some point open a PDF (using the ShellExecute function).



I coded some javascript in this PDF with Life Cycle Designer to print its content and finally close it automatically using event.target.closeDoc().



The problem is that just the PDF is closed but not Acrobat Reader.

I need Reader to be also terminated, to catch the end of process signal in my C++ program and to continu the execution.



Do have any idea if there is a javascript function to close Reader?

Thank you very much!

Replies

Highlighted

Avatar

01-10-2008

Stephane,

Were you able to accomplish this. That is closing both adobe and pdf file using java script. If so, could you please let me know? We have exact same requirements as yours.



Thanks.

John
Highlighted

Avatar

01-10-2008

Hi John,



After a lot of research and tests, I didn't find the solution. You can't close Acrobat Reader from a pdf. (for security reasons; It's like you are not allowed to closed a browser with a javascript function).



Finally we moved to the PDF library C++ SDK, so Reader is no more opening, but we had to pay for that...



Stephane
Highlighted

Avatar

01-10-2008

Stephane,



Thank you very much for your prompt reply. That will help me to decide what route to take. We are planning to use adobe livecycle java APIs and will print PDF directly to the default printer (silent print) without opening Adobe Reader.



John.