How to print ADOBE PDF files in batch

Posted on 2006-04-18
Last Modified: 2013-12-03
I am having a problem with batch printing of ADOBE PDF files.  I see that there has already been a lot of discussion on this topic, but I still cannot find an acceptable solution to this problem.  Below is what I have learned so far:
1.  ADOBE 4.0 seems to work, using the "/t" print parameter.  This is not, however, an acceptable solution.  We need the current version to work.
2.  Above version 4.0, ADOBE prints one PDF OK, and then it hangs up (does not close).  Program control does not return to the batch file.
3.  ADOBE claims that the command line method is unsupported.  I assume that the recommended ("supported") method would be via "DDE" interface, but I am unable to find anyone who has written one.
4.  Third party solutions that support "Watched Queues" are unacceptable, because we need the capability of going to ANY printer Anytime.  We do not want the maintenance burden of having to define ALL printers and queues on the print server.
5.  Ideally, we would like to issue a simple command and pass the path, filename, and full UNC name of the Printer.  It would also be great if the command would return success/failure flag, in case the PDF was currupt or something... as long as the command never "Hangs up".
6.  Windows has no problem with closing ADOBE Acrobat Reader when you print the PDF by "Right Clicking" it.  (Is this DDE??)
7.  This has evolved into a major problem for us.  It seems to me that there MUST be an easier solution somewhere.
8.  Our users are currently able to attach all kinds of PC files to the database, and we can direct ANY of these in batch to ANY printer (docs, xls, bmp, jpg, etc.)... EXCEPT Adobe PDFs.  I would think that the folks at ADOBE would be inundated with requests for this funtionality.  But when I search ADOBE's site, all I can find is that the question is being asked frequently by the users, but they are being ignored.

How can I get ADOBE to work?
Thank you
Question by:denniskroenke
    LVL 11

    Expert Comment


    Author Comment

    Yes, I looked at the thread above and this does not help (See #4, above).  Basically, I need to execute a single "DOS-Type" command to print a specified PDF to a specified printer.  The command line interface to Acrobat did this FINE in v4.0, but for reasons unknown, it has become unreliable in all of the newer versions.  

    Additionally, back in V4.0, we would occaisionally encounter a PDF file that was either corrupt or contained an "Interactive control" (like a button).  This would cause ADOBE to hang up and stop processing print jobs until an interactive error dialog was dimissed (#5, above).  An ideal solution would print the PDF if possible, yet kill the Acrobat job if not.
    LVL 44

    Expert Comment

    by:Karl Heinz Kremer
    Take a look at the tools on this page:
    There is also a commercial solution from Traction software, which supports a command line interface. I have no first hand experience with that tool however:

    Author Comment

    I have looked at "ChicksTools" and I see that the "PDFP.EXE" program appears to do a good job of "Batch printing" the PDF.  The only problem remaining is what to do if the PDF file is corrupt.  "PDFP" will hang up, as a stray ADOBE dialog box appears in the foreground.  After a long wait, the program will eventually time out and return control to the caller.  The problem now is that the ADOBE dialog panel remains on the desktop, and all subsequent calls to ADOBE fail until a user intervenes and dismisses this "Cannot open" dialog.

    This is a great step in the right direction, but to finish the job, I would like to find a way to either modify Chick's PDFP program to "time-out" and kill the ADOBE instance, OR introduce a new tool to verify the integrity/validity of the PDF file before attempting the print.

    LVL 44

    Accepted Solution

    Acrobat (or Reader) was not designed as tool for an automated workflow. There is not much you can do to avoid all the implications that has (that is without implementing a lot of code to deal with one problem at a time, just to find out that there is another problem that requires a slightly different response further down the road). I would look into commercial solutions.

    Expert Comment

    If I understand correctly, you need to print a pdf from a command line batch file, using the Adobe reader. You can write a simple batch file that does it.  These commands can also be embedded in a VBA or VB script and called using the "Shell" command.

    You'll need to find the path to AcroRd32.exe, and make sure it is installed and functioning.  The /p switch prints.  The /h switch hides, but does not close.  The /t switch is supposed to close but does not work, so I don't use it.  We'll use a taskKill command instead.

    First line of batch:  [path to adobe]\AcroRd32 /p /h [path and pdf file name] [Printer name] LPT1:
    Example: c:\program Files\Adobe\Acrobat 7.0\Reader\AcroRd32 /p /h /t "c:\temp\MyFile.pdf" \\printerpath\HP1000 LPT1:

    Second line of batch: taskkill /IM acrord32.exe

    This closes adobe task (/IM is image name)

    Works fairly well.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    *Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
    In a previous article published here at Experts Exchange, Signature Image with Transparent Background (, I explained how to cre…
    In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now