Home Search

DriveWorks Pro 22
PDF: Add Page Stamps

Send Feedback

PDF: Add Page Stamps

This Specification Task will add a page numbering stamp to a PDF file.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
PDF FileThe path to the PDF file to add page stamps.

Relative paths are resolved to the Specification directory if no prefix is defined.

Accepted prefixes: <Project>, <Specification>, <SpecificationMetadata>, <GroupContent>

Page RangeUse '*' or leave empty to select all pages.

Also accepts pipebar delimited list of page numbers, e.g. '1|2|3', or a range using a hyphen, e.g. '1-3'.

Stamp SchemaDefine the Stamp name schema.

Provide a string and use arguments: '{0}' for the page number and '{1}' for the total page count. Leaving this field blank will default to page number.

Stamp PositionPipebar delimited a list of stamp positions on the page in the following order: vertical|horizontal.

The vertical position accepts following values: Top, Center or Bottom.

The horizontal position supports: Left, Center and Right.

Leaving this field empty will default to 'Bottom|Right'.

Stamp MarginsPipebar delimited list of page margins in following order: Top|Right|Bottom|Left.

Leave this field empty will default to '15|15|15|15' margins.

Stamp FontSpecifies the font used to create page stamps within the PDF document.

For example: 'font-family: bell mt; font-size: 14.25pt; font-style: italic; text-decoration: underline'.

Stamp ColorColor name, hex or RGB codes. Leave empty to use black.
Stamp Page OffsetThe stamp starting page number.

Changing this value from 1 will amend the stamp text, for example changing this value to 0 will result in page stamp text showing 0 for the first document page.

Example

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleMeaning
PDF FileD:\DriveWorks\ProductGuide.pdfWill add page stamps to the ProductGuide.pdf document.
Page Range2|3|4|5Will add page stamps to pages 2 to 5 (omitting the first page).
Stamp Schema{0} of {1}The page stamp include the page number, the word of and the total number of pages on each page.

For example:

2 of 5

3 of 5

Stamp PositionBottom|LeftWill place the stamp at the foot of the page (bottom) in the left position.
Stamp Margins15|15|10|20Will position the page stamp within the margins corresponding to the Stamp Position property values used.

For example, with the Stamp Position property of Bottom|Left the margin values 10|20 will be used.

Stamp Font"font-family: microsoft sans serif; font-size: 9pt; font-weight: bold; text-decoration: underline"Will use this font for the page stamp.

The full font declaration is not needed, to only change the size of font from the document default just use:

font-size: 9pt;

Stamp ColorBlueWill use blue as the page stamp font color.
Stamp Page Offset1Will use the number 1 for the first page.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • Successfully added page stamp to page(s): <page numbers>.

Success with Warnings

  • N/A - Should never be fulfilled.

Failed

  • There was an error.
  • The PDF file could not be found or accessed.
  • The file given does not have a valid .pdf extension.
  • The page range is invalid or refers to pages which do not exist.
  • Failed to convert specified color.