Acrocat: A utility for
concatenating files to PDF format
Eric Woudenberg, Fall 2001
Acrocat is a command line (Bash, DOS prompt, etc) based utility that
uses Adobe Acrobat to concatenate multiple files into a single PDF
file. Each input file
occupies a new page of the output PDF file, except in the case where
the input is a PDF file itself, in which case the input PDF's pages
are inserted, in order, on separate pages in the output file. Acrocat
handles input files in .gif, .tif, .jpeg, .bmp, .png, .pdf, and even
.html and .txt format to some degree -- any format that Acrobat 5 can
open. Acrocat requires that Acrobat be installed on your machine
(Acrobat is available for purchase from Adobe).
acrocat [options] <input file1> [<input file2>] ...
options: -o <file.pdf> ; name output file (default 'out.pdf')
-v ; verbose, show DDE commands being sent to Acrobat
-s <file> ; don't send DDE commands to Acrobat, just store them to a file
-l <file> ; don't generate Acrobat DDE commands, load them from a file
-e ; show DDE error/result values (not reliably reported, unfortunately)
Acrocat produces DDE commands (ASCII strings) and sends them to
Acrobat 5 to perform the work of concatenating the files. The
-s switch causes the DDE commands to be saved in a file instead
of being sent. The -l switch causes the DDE commands to be read
from a file instead of being generated from the command line
arguments. These modes can be useful for examining or modifying the
operations to be conducted. By default, Acrocat creates a file named
out.pdf, the name of this file can be changed with the
You may download the executable or the executable and source package.
The executable can be built by running "make.bat" (assumes MS Visual C
is installed) or simply by typing "gcc -o acrocat acrocat.cpp"
(assumes GNU/Cygnus utilities are installed).
Caveats & Bugs
- Acrocat has only been tested under Windows 2000.
- If Acrobat has already been started by the user, acrocat will
sometimes use it (rather than starting Acrobat itself). This mode of
use is buggy. It is best to run acrocat without Acrobat already
running, letting acrocat start Acrobat itself.
I wrote this in order to make the Minidisc Patents
page. With over 1000 tif files that needed to be combined into
some 96 PDF files, I refused to take the "drag 'til you drop" approach
afforded me by the Acrobat GUI.
This program was developed directly from the Adobe Acrobat 5.0 SDK examples,
downloadable from http://partners.adobe.com/asn/developer/acrosdk/acrobat.html.