Expand my Community achievements bar.

Close both the PDF and Acrobat Reader from Javascript

Avatar

Former Community Member
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!
3 Replies

Avatar

Former Community Member
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

Avatar

Former Community Member
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

Avatar

Former Community Member
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.