General Options - StampPDF Batch

StampPDF Batch Command-Line Options

Command-line options are used in all Appligent Document Solutions server applications. The General options deal with product information, progress messages, and file maintenance. The following sections detail the use of these options.

General options

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

OptionParameterDescription
-r <RegNum> Pass registration number to StampPDF Batch
-l <logFile> Write progress information to logfile
-p   Provide progress messages
-n   Do not write anything to screen
-v   Display version information
-h or -help   Display usage information
-o <outFile.pdf> Save output to a new file or directory
-d <string> Owner password to open this document
-w   Linearize the file upon save
-i   Perform incremental save
-optimize   Optimize the output file to try to reduce file size
-nocomp   Do not compress using Object Streams (resulting file is compatible with all versions of Acrobat)
-comp   Compress using Object Streams (resulting file requires Acrobat 6 and later)
-iso32000   Set file for ISO 32000 compliance (PDF 1.7)

General options detailed

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

-r <RegNum> — Pass registration number to StampPDF Batch

This option can be used to supply your registration number to StampPDF Batch from a script or another application:

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

This option is typically not necessary and is available for use in cases where the Appligent License File can not be located by the application because of runtime environment restrictions.

-l <logfile> — Log to a log file (optional)

Write to a text file any errors and progress messages. A log file is created only when errors are present. This option is helpful for debugging. The -l <logfile> option must be followed by a file name. Your log file will look different if you are also using the -p option.

Note: If the log file you specify is a read-only file, a warning is displayed and nothing is written to the log file. 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. This option is helpful for debugging and for understanding how StampPDF Batch works.

A note on using -p and -l <logfile> together

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

-l-perrors foundResult
    Nothing will be written to the screen or to the log file you specify
    Progress message will be written to the screen and stamppdf.log
  Progress messages will be written to the screen and to the log file you specify
    A stamppdf.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 stamppdf.log and your screen
Both progress and error messages will be written to the screen and to the log file you specify

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

-n — Do not write anything to screen (optional)

Do not write anything to the screen (or STDOUT). If you are running batch mode, this prevents progress messages from building up.

-v — Print version information (optional)

Display the version of StampPDF Batch you are running. This is important when corresponding with us via support@appligent.com. In order to best understand your problem, we must know what version of the software you have. StampPDF Batch will not do anything else if you use this option.

-h or -help — Show usage (optional)

Display all available command-line options. StampPDF Batch will not do anything else if you use either of these options.

-o <outFile.pdf> — Save to a new file or directory (required)

When processing one input file, specify an output file for the results. If you are processing more than one input file at a time, specify an existing directory for the resulting files. When you stamp several files at one time and use the -o option, make sure to specify the name of an existing directory.

ADVISORY: We recommend that you always specify a new output file name so that your original file will remain unchanged.

-d <string> — Owner password to open the document (optional)

If the PDF document you wish to stamp has been encrypted, you must pass the owner password with the -d <string> option in order to stamp the file. If you are processing more than one input file at a time, the owner password must be the same for all files.

-w — Linearize the file upon save (optional)

Save the output file as a linearized document. 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.

-i — Perform incremental save (optional)

An incremental save appends changed information to the end of the file. This is faster than a full save, but may result in a larger file. A full save is similar to using the “Save As...” command in Adobe Acrobat. It is a save that attempts to clean up a PDF file, often reducing its size.

Note: There are four new options available in StampPDF Batch 5.x and later.

-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.

-nocomp — Do not compress using Object Streams (optional)

This flag will not compress Object Streams, resulting in a document that is compatible with all versions of Acrobat.

-comp — Compress using Object Streams (optional)

This flag will compress Object Streams, resulting in a document that is compatible with Acrobat 6.0 and later.

-iso32000 — Set file for ISO 32000-1 compliance (optional)

This flag sets the file for compliance with ISO 32000-1:2008 (PDF 1.7).