About AFPMerge
Note: Option is only available in the Enterprise edition of OL Connect.
AFPMerge is a command-line tool that can embed external resources in one or more AFP files, merge multiple AFP files into one, and indicate what form definition to include in the output AFP.
The tool is installed with OL Connect Enterprise when either the OL Connect Designer or Server component is installed.
AFPMerge can be found in the OL Connect installation folder:
C:\Program Files\Objectif Lune\OL Connect\AFPMerge\bin
For more information about its use in OL Connect, see Preprocessing AFP input.
Command line options
-i, --input <input> | The AFP input file. This option cannot be combined with -l. |
-l, --list <list> | A manifest file that lists AFP input files. |
-r, --resdir <resdir> |
The folder in which the files to embed are stored. (With -l, if the given folder does not contain any resource files, the tool won't embed any files but will still merge the files listed in the manifest file.) |
-o, --output <output> | The output file. |
-b, --basedir <basedir> | The directory to search for files listed in the manifest file (see -l option). |
-f, --formdef <formdef> |
(Optional.) A form definition to use for the AFP output. |
-h, --help |
Prints a list of all of the tool's command line options and what they do. |
Log level options
When AFPMerge is invoked without a log-level option, error and warning messages are logged, as well as info messages that occur once per run. Info messages that are repeated for each input file or even more often, are not shown.
The following command line options change the log level.
-q, --quiet |
Quiet mode: no log messages. |
-v, --verbose |
Verbose logging: error, warning, and info messages. |
-d, --debug |
Detailed logging: error, warning, info, debug, and trace messages. |
Manifest file format
The manifest file (-l option) must be a UTF-8 encoded file that lists one file per line.
Example: print75X-1.AFP
print75X-12.AFP
print75X-3.AFP
print75X-34.AFP
print75X-5.AFP
print75X-56.AFP
print75X-7.AFP
print75X-78.AFP
AFPMerge will wrap each file in a page group, and that page group gets a Tagged Logical Element (TLE) named GROUP, with its value set to the input filename.
Optionally, the file can have two tab-delimited columns.
Example: print75X-1.AFP doc1
print75X-12.AFP doc1
print75X-3.AFP doc1
print75X-34.AFP doc2
print75X-5.AFP doc2
print75X-56.AFP doc3
print75X-7.AFP doc3
print75X-78.AFP doc3
When a second column is present, AFPMerge uses it as a grouping key and puts files with the same grouping key in the same page group. Each page group gets a TLE named GROUP that holds the value of the grouping key.
The above example will create a combined AFP file with 3 page groups.
Examples
With a single input file:
"C:\Program Files\Objectif Lune\OL Connect\AFPMerge\bin\AFPMerge.exe" -i c:\input\myinputfile.afp -r c:\myresourcefolder -o c:\output\myoutputfile.afp
With multiple input files:
"C:\Program Files\Objectif Lune\OL Connect\AFPMerge\bin\AFPMerge.exe" -l c:\input\mymanifest.txt -r c:\myresourcefolder -o c:\output\myoutputfile.afp