These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Silent Print & Quit Adobe Acrobat

MikeOrlando
Registered: May 13 2010
Posts: 4

Hello All,

I am looking for some help with a project that is quickly becoming VERY frustrating. I am trying to create a java script that when applied to a PDF will have it silent print to a specific printer. What I hope for is when the PDF is opened it silently prints and then Adobe Acrobat closes.

I have created a folder-level java script to silently print and made it trusted so that no prompts come up.

sPrint = app.trustedFunction(
function(){
app.beginPriv();
this.print({bUI:false, bSilent:true, bShrinkToFit:false});
app.endPriv();

}
)

How can I modify this script to print to a specific printer name instead of just the default?

Also, I would like Acrobat to close/quit the entire program when complete, not just PDF. I tried:

app.execMenuItem("Quit");

... From what I read that is not allowed. Is there any other alternative?

I would like the user to be able to access the PDF and then have it print and them return to the application that they are working in without any intervention on their part.

Do I need to consider a different PDF viewer to accomplish my goal?

HELP!

My Product Information:
Acrobat Pro 9.3.1, Windows
MikeOrlando
Registered: May 13 2010
Posts: 4
If it is not possible to "Quit" Acrobat I would settle for minimizing it down to the task bar. I have tried to see if there was a way in the JavaScript to kill the acrobat.exe process to get it to quit and no luck there either.

To minimize I thought I could access the menu fuction, but no luck:

app.execMenuItem("MinimizeAll");


Any suggestions?
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You can close an open PDF
app.execMenuItem("Close");

George Kaiser

MikeOrlando
Registered: May 13 2010
Posts: 4
Thank you for the reply. Using that command will close the open document; however Adobe Acrobat remains open. What I really wish I could do was Quit; however the execution of that command is not permitted.

My goal is to have the user click on a report, have it open, sliently print to the correct printer, and then ideally close the entire program so they are back to where they started without intervention. I would settle minimizing the Acrobat window after the doucment is closed.