You can also stamp images onto a document. Images for stamping can be in JPEG, TIFF, or PDF format. Both standard JPEG and Photoshop JPEG formats are supported.

For convenience, the parameters that pertain to image stamping are repeated here:

Type Parameter Text Image PDF Default Comments
Begin Begin_Message   Start of stamp item
 Label Name   Name of stamp
UndoLabel   Permits the later removal of a stamp
Type   Required: Specifies type of stamp
 Pagination StartPage 1 Start page for stamp
EndPage -1 End page for stamp
PageIncrement 1 How many pages to skip between stamps
PageRange all Which individual pages to stamp
 Positioning Bottom, Left From Options Block Margins for stamp. Overrides margin values in options block
Position Top Position and orientation on page
Justification Center Left,right or center
Angle     0 Angle to rotate text stamp
Underlay No Above (no) or beneath (yes) existing text/images
PageBox cropbox Sets which set of page boundaries are used to position the stamp
OffsetX   Horizontal placement offset
OffsetY   Vertical placement offset
 Image Options Path     Location of image file
Scale     Specify size of image
PageNumber       The page of a PDF to be stamped
End End_Message   End of stamp item

Note: In older versions of AppendPDF Pro, only the Left and Bottom values are used for image stamping. AppendPDF Pro will ignore values for Right and Top. With version 5.0, all four coordinates (top, bottom, left and right) are used to position and scale the image. With all four coordinates set, the Scale parameter is ignored. If you wish to use the scale parameter, you should only specify Left and Bottom margins for the image stamp item.

Stamp parameters — detailed description

The LabelPagination, and Positioning parameters work as they do with text stamps. The parameters exclusive to Image stamps are described below.

Label parameters

Type (required)

Type specifies the kind of image that will be stamped. Images include JPEG and TIFF. PDF images are defined as a separate type. To specify the type of image use the following:

Image to stamp a JPEG or TIFF file

Type (Image)

PDF to stamp a PDF file

Type (PDF)

Image options parameters

Path (required)

Path specifies the location of the image file to stamp. Enter the directory path, using the full path is best practice, and use the convention that is native to your operating system. Windows separates directories with backslashes: \, while UNIX systems use forward slashes: /. For the image called Image.jpg in our samples directory path will look like this on Windows:

Path (C:\Appligent\AppendPro\Samples\Image.jpg)

Scale (optional)

The Scale parameter increases or decreases the size of the original image when it is stamped onto the PDF document. A scale of 0.5 will make the image half (50%) of its original size, while a scale of 2 (200%) will double it.

Notes on positioning image files

Positioning works differently for images than it does for text.

For text, margin settings and positioning parameters act together to position a text stamp. The TopRightBottom and Left parameters specify a rectangle, and the Position and Justification parameters place the text within that rectangle.

For images, the Bottom and Left parameters specify the location of the bottom left corner of the image.

The Position and Justification parameters are alternate means of specifying position. Use the Position parameter in place of Bottom for vertical positioning, and the Justification parameter in place of Left for horizontal positioning:

  • Bottom overrides Position. If you specify a Bottom value, any Position value is ignored.
  • Left overrides Justification. If you specify a Left value, any Justification value is ignored.

For example, you could specify that the left and  bottom corner is a (0,0), but then you cannot center the image on the page as well.

In either case, use the Scale parameter to size the image.

A sample image stamp item

For example, the figure below shows the stamp item in letterstamp.txt to place a signature:

# — Stamp Item — Comment
Begin_Message Begin Stamp Item
Name (Signature) Named Signature
Type (Image) Image stamp
StartPage (1) Start stamp on first page
EndPage (-1) Stamp to the last page (stamp only last page)
Left (50) Left, bottom corner of image is 50 points from left edge of page
Bottom (220) Left, bottom corner of image is 220 points from bottom of page
Underlay (No) Place it over existing text and graphics
Path (./samples/stampfiles/sig.jpg) Use image file named sig.jpg in ./samples/stampfiles directory
Scale (1) Place image at actual size
End_Message End Stamp Item

Stamping a PDF file

Set the Type parameter to PDF to stamp a PDF file onto your document. For example, if you have a company letterhead in PDF format, you can stamp this on all your computer generated invoices to create personalized, professional invoices.

Some notes about stamping PDF files:

  • If the PDF document contains more than one page, the first page will be stamped onto your document by default. If you want to stamp an image of a different page use the PageNumber parameter listed below.
  • PDF files are usually full page size. PDF stamps are convenient for stamping information that is already positioned on a page so you don’t have to worry about manually placing individual elements by specifying position in points.
  • The white areas in a PDF stamp are not transparent. Make sure the stamp does not interfere with the content of your document and that you set Underlay to Yes. You can also crop the PDF page in Acrobat if the stamp does not fill the entire page to remove extra white areas.

Image options parameters

PageNumber (optional)

If you are placing an image of Type (PDF), and the PDF document has more than one page in the file, use the PageNumber option to specify the PDF page number that has the PDF image you want to stamp into your document. If you do not enter a PageNumber, the first page of the PDF will be used as the image stamp.

A sample PDF stamp item

For example, the figure below shows the stamp item in letterstamp.txt to place a PDF file looks like this:

# — Stamp Item — Comment
Begin_Messge Begin Stamp Item
Name (Return Address) Named Return Address
Type (PDF) PDF Stamp
StartPage (1) Start on first page
EndPage (1) Stamp first page only
Bottom (0) Left, bottom corner of image is on the left edge of page
Left (0) Left, bottom corner of image is on the bottom of page
Underlay (Yes) Place it over existing text and graphics
Path (./samples/stampfiles/letterhead.pdf) Use image file named letterhead.pdf in ./samples/stampfiles directory
End_Message End Stamp Item