In this chapter…
… you learn what a stamp file is and how to build one.
- What is a Stamp File gives a general overview of what is in a stamp file and how it works.
- Creating the Stamp File’s Options Block explains setting parameters for the entire file.
- Creating Stamp Items for Text Stamps covers parameters specific to text stamps.
- Using Unicode explains how to use Unicode in your stamps.
- Stamping Barcodes shows how you can stamp barcodes onto documents.
- Page Transform shows how to scale and shift the position of the page allowing space to be cleared around the original page so stamps don’t overwrite any original page content.
- Creating Stamp Items for Image Stamps covers parameters specific to stamping images.
- Using Variables in Stamp Files explains how to use variables when creating text stamps.
- Letterstamp Example explains the entire sample file letterstamp.txt.
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.
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.
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.
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.
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:
stamps the item on the top of the page.
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