Link to home
Start Free TrialLog in
Avatar of mac_g
mac_gFlag for Saudi Arabia

asked on

batch script to print PDF report


 request your assistance in this regard...
 
when we called the first time(below script) - sending the print request to the PDF fie,  pdf-instance sitting on the status bar. ................it is OK to have .
 
keeping this instance on status bar, when we trigger one more time, the PDF instance maximize and setting on the desktop.
 
can we able to make this instance should always be sit on status bar/close once the print request is over,  even in second run of the script/subsequent run of the script.
 
-- this issue reported by the report end-user who runs from few 100's of reports daily.
-- we are calling this report from oracle-forms application.
 
 
please advice
-------
path = C:\Program Files\Adobe\Reader 9.0\Reader
start /MIN /B "Title of window" AcroRd32.exe /h /t "C:\test\ddd.pdf" "BARCODEPRINTER"
exit
 
--------------
Avatar of BillDL
BillDL
Flag of United Kingdom of Great Britain and Northern Ireland image

Take a look here:
http://www.robvanderwoude.com/printfiles.php#PrintPDF
and scroll down past the green batch file text to the section heading "A note by Michael Butler on printing lots of PDFs from the command line".

The author writes this:

>>>
"I think your PDF printing methods listed may not work well for a list of over 50 PDFs. I had a script using

CALL START /MIN AcroRd32.exe /h /p [filename]

for each PDF in a list, but it stopped queuing them up at about the 35th-50th one (had a list of 90), depending on the computer. I think it is related to how memory is allocated with CALL START.

After a lot of troubleshooting, I found that you can FIRST launch Adobe Reader using

CALL START /MIN AcroRd32.exe /h

and then later in the script just call (without using CALL START)

AcroRd32.exe /h /p [filename]

for each file name, and it will allow execution to return to the batch file because Adobe Reader is already open. This worked well for printing/queuing up over 100 PDFs.

I tried your recent /T switch option for Reader 7 and it seemed to open a new instance of AcroRd32.exe for every PDF - not feasible when printing more than 10 PDFs. The downside is that without /T, one instance of AcroRd32.exe will still be left open after the script ends, albeit minimized."
<<<

Try that suggestion and see if it helps.

ASKER CERTIFIED SOLUTION
Avatar of mac_g
mac_g
Flag of Saudi Arabia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial