Acrocat: A utility for
concatenating files to PDF format
Eric Woudenberg, Fall 2001
(eaw@connact.com)
Summary
Acrocat 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).
Usage
acrocat [options] <file1> [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)
Details
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
-o switch.
Download
You may download the executable or the executable and source package.
Recompiling
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).
Bugs
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.
Why
I wrote this in order to make the Minidisc Patents
page. There were over 1000 tiff files that needed to be combined into
some 96 PDF files. I refused to take the "drag 'til you drop" approach
with the Acrobat GUI.
Credits
This program was developed directly from the Adobe Acrobat 5.0 SDK examples,
downloadable from http://partners.adobe.com/asn/developer/acrosdk/acrobat.html.