Introduction

Common command-line options are used in all Appligent server applications. These options deal with product information, progress messages, and file maintenance.

General options — summary

The following table provides a summary of the general command-line options:

Option Parameter Description
-o outFile.pdf Save output to a new file or directory.
-l logfile Write progress information or errors to log file.
-p Display progress messages to the console or screen.
-v Display version information.
-h or -help Display usage information.
-w Linearize the file upon save.
-optimize Optimize the output file to try to reduce file size.
-iso32000 Set file for ISO 32000 compliance (PDF 1.7).
-r RegNum Optionally Pass registration number to FDFMerge Pro.

General options — detailed

The following sections provide details on using the general command-line options.

-o — Create a new output file or directory (required)

If you are processing one input file, specify an output file to save the results to. If you are processing more than one input file at a time, specify an existing directory to save the resulting files to.

Important! If you do not specify an output file or directory, the command will fail.

-l — Create a log file (optional)

Specify a text file for any errors and progress messages. This option is helpful for debugging. The -l option must be followed by a file name. If there are no errors, no file is written. If a log file is not specified, errors are written to the default log file fdfmergepro.log. Make sure that your log file is write enabled.

-p — Show progress (optional)

Write progress messages to the screen STDOUT, the standard output of your system and to the default log file fdfmergepro.log. This option is helpful for debugging and for understanding how FDFMerge Pro works.

A note on using -p and -l together

As outlined in the above sections, the -p option gives you progress messages on your screen and the -l option writes error messages to a file if errors occur. The table below provides more detail on using these options alone or together.

-l -p Errors Found Result
Nothing will be written to the screen or to the log file you specify.
Progress messages will be written to the screen and fdfmergepro.log.
Progress messages will be written to the screen and to the log file you specify.
An fdfmergepro.log file will be created with the errors in your working directory.
Errors will be written to the log file you specify.
Errors will be written to fdfmergepro.log and your screen.
Both progress and error message will be written to the screen and to the log file you specify.

Therefore, -l  used on its own will only go into action if there are errors. With -p and -l combined, you will get a text file with full details on FDFMerge Pro operations whether there are errors or not.

-v — Display version information (optional)

Display the version of FDFMerge Pro you are running. This is important when corresponding with support@Appligent.com. In order to better understand your problem, we must know what version of the software you have. FDFMerge Pro will not do anything else if you use this option.

-h or -help — Show usage (optional)

Display all available command-line options. FDFMerge Pro will not do anything else when you use these options.

-w — Linearize the file upon save (optional)

Save the output file as a linearized document, also known as optimized. Linearization reorganizes the file to make it more efficient for web delivery. Individual pages can be rendered before the entire document has downloaded, so the user can start reading the document sooner.

-optimize — Optimize the file (optional)

This flag will do the following: 1) encode any non-encoded streams using Flate compression, 2) remove ASCII85 filters from all streams, 3) replace LZW encoded streams with Flate encoding, 4) merge identical XObjects and images, 5) optimize common sequences in page content, and 6) merge identical font descriptors and encodings. This option will usually result in a smaller file size.

-iso32000 — Set file for ISO32000 compliance (optional)

This flag will set the file for ISO 32000 compliance, resulting in a document that is PDF version 1.7.

-r — Pass registration number to FDFMerge Pro (optional)

Passing a registration number to FDFMerge Pro is only required in some custom software installations where the registration number can not be accessed by the application.  Use this option to supply your registration number when you call FDFMerge Pro from a script or another application:

$ fdfmergeproapp -r XXXX-XXXX-XXXX-XXXX-XXXX-XXXX [other options]

This option may also be used on the command line. However, as a convenience, you can use the fdfmergepro script, created during installation, to call fdfmergeproapp and supply the registration number:

$ fdfmergepro [other options]

Important! Do not call the fdfmergepro script from another script or application. Call fdfmergeproapp directly, as shown in the first example.