views:

47

answers:

2

My application generates between 35 and 55 PDF files of which I have to automatically print four copies.

All these files are in a single folder.

My requirement is to use a batch file to print four copies of each file.

I have Adobe Acrobat Reader installed.

How do I do this?

A: 

To start, you would have to have an application capable of reading PDF files. Then, from there, we can determine the command-line parameters to use for your program.

palswim
I do have Adobe Acrobat Reader installed
Raj More
+2  A: 

Adobe Reader is only capable of printing a single copy directly. However, nothing prevents you from looping and printing it 4 times. It may take longer, though, since the document has to be sent to the printer four times.

From the Acrobat SDK Developer FAQ:

AcroRd32.exe /t path "printername" "drivername" "portname" — Start Adobe Reader and print a file while suppressing the Print dialog box. The path must be fully specified.

The four parameters of the /t option evaluate to path, printername, drivername, and portname (all strings).

printername — The name of your printer.
drivername — Your printer driver’s name, as it appears in your printer’s properties.
portname — The printer’s port. portname cannot contain any "/" characters; if it does, output is routed to the default port for that printer.

So you can probably use something like this:

for %%F in (*.pdf) do (
  for /L %%i in (1,1,4) do (
    AcroRd32.exe /t "%%~fF" "printername" "drivername" "portname"
  )
)

Just insert the appropriate values for the missing arguments.

Joey