LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I automatically close a PDF document after it is done printing?

Hello all,
 
To cut to the chase I am using the System Exec.VI to open a PDF with Adobe Reader 8.0 and printing the document.  I can do this without a problem.  The problem is I would like to have this window close automatically when it is done printing.  I have seen on the web that the switch to make this happen is /t, but for some reason my pdf doc is not closing.  My command line looks like this
 
"C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" /t  "path to the file" "default printer name"
 
Is there another way to terminate the window not using switches in the command line statement?
 
I have tried using active x calls to open the doc and print but I am not seeing any print options in the active x calls.  I have searched thourgh a large portion of the classes and could not find any print statements.  I have also tried opening the doc with the system exec.vi and priting and then closing it with active x but I get an error message back.
 
Has anyone had any success in opening a pdf doc, printing and then closing the window automatically afterwards? 
0 Kudos
Message 1 of 4
(6,513 Views)

Hi gammalight,

i use Adobe Reader 7.0 and it works in this way for me. The document is printed with the default printer.

Mike



Message Edited by MikeS81 on 03-28-2008 04:26 PM
0 Kudos
Message 2 of 4
(6,509 Views)
Hey Mike,
 
Thanks for the reply, but I tried it exactly as you have it but for some reason it still does not work.  I can not even get my window to minimize, i.e. having the true constant wired into the run miminized option.  Again I am using Adobe 8.0.  Has anyone using Adobe 8.0 had this problem, or knows how to fix this problem?
 
Thanks
 
gamma
0 Kudos
Message 3 of 4
(6,495 Views)

Hai,

Better you can use open file.vi to open pdf and user32.dll functions to generate mouse click events on the appropriate positions you require.

Mathan

Message 4 of 4
(6,438 Views)