PDF - Stamp
Declaration
<AMPDF ACTIVITY="stamp" SOURCE="text" STAMP="text (options)" PDF="text" PAGEINDEX="number" X="number" Y="number" ANGLE="number" PAGE="number" ISBACKGROUND="YES/NO" />
Description: Adds a text, image or template based stamp to one or more pages of a PDF document at the specified coordinates.
Practical Usage
A PDF stamp is intended to be viewed just like an ink stamp on a paper document. This activity can be used to place a stamp of approval or add stamps to be used as placement markers on a document. For example, a "sign here" marker or a check mark to indicate an item has been reviewed or signed.
Resource Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Resource |
--- |
--- |
--- |
--- |
Indicates where the source PDF should originate from. This is a design mode parameter used only during task construction and configuration, thus, comprises no markup. The available options are:
|
Session |
Text |
Yes if Resource parameter is set to Session |
PDFSession1 |
SESSION="mySession" |
The name of an existing session to associate this activity with. This parameter is active only if the Resource parameter is set to Session. |
Use |
Text (options) |
Yes if Resource parameter is set to File |
Existing PDF |
|
Specifies whether this activity will be performed on an existing PDF document or on a new document. This parameter is active only if the Resource parameter is set to File. The available options are:
|
Source PDF |
Text |
Yes if Use parameter is set to Existing PDF |
(Empty) |
SOURCE="C:\PDFFileName.pdf" |
The path and filename of an existing PDF document to be used as the source. This parameter is active only if the Use parameter is set to Existing PDF. |
Password (optional) |
Text |
Yes if Use parameter is set to Existing PDF |
(Empty) |
PASSWORD="encrypted" |
The password required to open an existing PDF document (if required). This parameter is active only if the Use parameter is set to Existing PDF. |
On completion |
Text (options) |
Yes if Use parameter is set to Existing PDF |
Save |
|
Specifies what action should be performed on the existing PDF file upon completion of this activity. This parameter is active only if the Use parameter is set to Existing PDF. The available options are:
|
Destination PDF |
Text |
Yes if On Completion parameter is set to Save as |
(Empty) |
DESTINATION="C:\PDFFileName.pdf" |
The new path and/or filename in which to save a copy of the original PDF file. This parameter is active only if the On completion parameter is set to Save as. |
New PDF |
Text |
Yes if Use parameter is set to New PDF |
(Empty) |
NEWPDF="C:\PDFFileName.pdf" |
The path and file name in which to output the newly generated PDF document. This parameter is active only if the Use parameter is set to New PDF. |
Data Properties
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Type |
Text (options) |
Yes |
Text |
|
The type of data that the stamp should derive from. The available options are:
|
Text |
Text |
Yes if Type parameter is set to Text |
(Empty) |
TEXT="theStampText" |
The text to be stamped. This parameter is active only if the Type parameter is set to Text. |
Image |
Text |
Yes if Type parameter is set to Image |
(Empty) |
IMAGE="C:\temp\image.jpg" |
The path and file name of the source image that will be used to stamp the document. Image types supported are .jpg, .gif and .png. This parameter is active only if the Type parameter is set to Image. |
Page index |
Number |
Yes if Type parameter is set to Template |
(Empty) |
PAGEINDEX="2" |
The page index in which to retrieve the desired PDF template. This parameter is active only if the Type parameter is set to Template. |
Template PDF |
Text |
Yes if Type parameter is set to Template |
(Empty) |
PDF="c:\temp\file.pdf" |
The path and filename of the source PDF document that contains the template to stamp. This parameter is active only if the Type parameter is set to Template. |
Advanced Properties
Property |
Type |
Required |
Default |
Markup |
Description |
Advanced Text Properties - The following parameters are active only if the Type parameter is set to Text . |
|||||
Font |
Text (options) |
No |
Segoe UI |
FONT="Times New Roman" |
The font typeface to be stamped. The available list box allows selection from a predefined list of fonts. The default value is Segoe UI. |
Font size |
Number |
No |
11 |
SIZE="10" |
The size of the font to be stamped. The default value is 11. |
Text color |
Text (options) |
No |
Black |
FORGROUNDCOLOR="Blue" |
The color of the text to be stamped. The available list box allows selection from a predefined list of colors. The default value is Black. |
Background color |
Text (options) |
No |
White |
BACKGROUNDCOLOR="SeaShell" |
The background color to be stamped. The available list box allows selection from a predefined list of colors. The default value is White. |
Advanced Image Properties - The following parameters are active only if the Type parameter is set to Image . |
|||||
Width |
Number |
No |
200 |
WIDTH="300" |
The width of the image to be stamped specified in points (note that 1 inch = 72 points and 1 inch = 96 pixels). The default value is 200. |
Height |
Number |
No |
200 |
HEIGHT="400" |
The height of the image to be stamped specified in points (note that 1 inch = 72 points and 1 inch = 96 pixels). The default value is 200. |
Position Properties - The following parameters specify the position and rotation angle of the text, image or template stamp. |
|||||
Left |
Number |
No |
10 |
X="11" |
The X (left) position of the stamp. The default value is 10. |
Bottom |
Number |
No |
10 |
Y="11" |
The Y (bottom) position of the stamp. The default value is 10. |
Rotation angle |
Number |
No |
45 |
ANGLE="40" |
The rotation angle of the stamp. The default value is 45. |
Stamp as background |
Yes/No |
No |
Yes |
ISBACKGROUND="NO" |
Specifies whether the content will be stamped as background. The default value is YES. |
Pages Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
All |
--- |
--- |
--- |
--- |
If enabled, all pages of the PDF document will be stamped. This is a visual mode parameter used only during design time, therefore, it contains no properties or markups. This parameter is enabled by default. |
Page(s) |
Number |
No |
(Empty) |
PAGE="1,3,5" |
An individual page or specific pages of the PDF document will be stamped. Enter the page number to specify a single page (e.g., 2 or 4). Use a comma (,) to specify more than one page (e.g., 1,3,5). Use a dash (-) to specify a range of pages (e.g., 5-10). |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Stamp template PDF "C:\temp\template.pdf". Stamp position ( bottom="35" , left="35" ). Stamp on page "2-4". Existing PDF "C:\temp\sourceForm.pdf". Save PDF As "C:\temp\targetPDF.pdf".
<AMPDF ACTIVITY="stamp" SOURCE="C:\temp\sourceForm.pdf" PASSWORD="AM2SsRQOTDCxvUrxCM5UcK19Q==aME" SAVETYPE="save_as" DESTINATION="C:\temp\targetPDF.pdf" STAMP="template_pdf" PDF="C:\temp\template.pdf" PAGEINDEX="2" X="35" Y="35" ANGLE="42" PAGE="2-4" ISBACKGROUND="NO" />