Stamp Files

In this chapter…

… you learn what a stamp file is and how to build one.

We will be using the sample stamp file letterstamp.txt in the samples directory as an example throughout this chapter. The default location for StampPDF Batch on Windows is C:\Appligent\StampBatch\. On other platforms, it will be wherever you installed it.

What is a Stamp File?

A stamp file is a text file that specifies how StampPDF Batch will apply stamps to your document.  A stamp file has two main components:

  • an options block placed at the beginning of the stamp file, containing the version of the stamp file, and specifies general stamp properties. Each line in the options block describes properties for the entire PDF document being stamped.
  • one or more stamp items that contain the parameters to describe a particular stamp. Each stamp has its own stamp item and a stamp file can have an unlimited number of stamp items.

Options block overview

The options block specifies properties for the entire file. It consists of the following sections:

  • Label — specifies the version of the stamp file.
  • Positioning — specifies the default stamp margins for the entire PDF file.
  • Acrobat options — specifies how Acrobat handles the document when opened.

Stamp items

Each stamp file can specify many stamps. The parameters for an individual stamp are contained in a stamp item. StampPDF Batch supports these types of stamps:

  • Text stamps — Specify the text to stamp onto the document
  • Unicode text stamps — Unicode text to stamp onto the document; for example, Chinese, Japanese or Korean text
  • Image stamps — JPEG or TIFF image to stamp onto the document
  • PDF stamps — PDF files stamped into the document
  • Barcode stamps — Currently supports a variety of 1D and 2D barcodes
  • PageTransform — Scale and Transform the page contents

All types of stamps use pagination, positioning and general parameters. Other parameters are unique to each type of stamp. Stamp items begin with the keyword Begin_Message and end with the keyword End_Message. In the following sections we will explain all the stamp item parameters, create stamp items for text stamps and create stamp items for image stamps.

Parameters

Each stamp item is described by a parameter/value pair. There must be at least one space in between Parameter  (value). Enter parameters as follows:

Parameter (value)

For example:

Position (Top)

stamps the item on the top of the page.

Comments

You can insert comments where you need them to make the file more readable, or you can comment out sections for debugging purposes. Comments start with the hash or number symbol (#) which must be placed at the beginning of a line:

# This is a correct comment

Below is an incorrect comment:

Begin_Message #beginning of the file list