When you are working with documents, there is a lot of information that varies from document to document — dates, times, filenames, etc. Even within a document there are things that change from page to page, such as page numbers or headers and footers. StampPDF provides a series of variables that access this dynamic information and stamp it into your document.
Each variable is case sensitive and has a specific output. For example, the date stamp %a %b %d will be formatted as:
Wed Oct 07
If you would like punctuation to appear around the variable text, you may type it in around the variables. For example, if you change the above date stamp to %a., %b. %d the stamp appear as:
Wed., Oct. 07
Note: All variables must be preceded by the percent ( character is missing, the variable name will appear in the stamped text (for example, “a” instead of “Wed”). If you want to use the
Below is a table of all variables available showing the variable name, what it does, and an example. Following the table are some examples using the variables.
|Variable||Drop-Down List||Description||Example Output|
|%A||Weekday Name||full weekday name||Friday|
|%a||Short Weekday Name||abbreviated weekday name||Fri|
|%B||Month Name||full month name||October|
|%b||Short Month Name||abbreviated month||Oct|
|%c||Local Date & Time||local date and time||Friday, October 01, 1998 7:36:24 PM|
|%d||Day of Month||day of month||15|
|%D||Ordinal Day of Month||adds an ordinal suffice to day of month (“th”, “st” etc)||20th|
|%G||Number of Pages||total number of pages||20|
|%<number>g||Page Number||number to use for the start of page numbering||2|
|%H||Hours (24 Hour Clock)||hours, 00-23||13|
|%I||Hours (12 Hour Clock)||hours, 01-12||01|
|%i(<info field name >)||Title
|PDF Document Properties values:
Author, Title, Subject, Keywords
Jane Smith (Author)
|%<page number>J||Bates Number||Bates page numbering up to 999999||000001|
|%j||Day of Year||day of the year, 001-366||099|
|%m||Numeric Month||month, 1-12||10|
|%N||File Name||document filename||file.pdf|
|%n||New Line. Use for multi-line stamps||sample stamp, line 1
sample stamp, line 2
sample stamp, line 3
|%P||File path||full document pathname||c:\My Documents\Stamp1.pdf|
|%p||AM/PM||local equivalent of AM or PM||PM|
|%r||Roman Numerals||lowercase Roman numerals for page numbers||xii|
|%R||Roman Numerals (caps)||uppercase Roman numerals for page numbers||XII|
|%U||Week of the Year (Sun 1st)||week of the year, 01-53 where Sunday is the first day of the week||36|
|%W||Week of the Year (Mon 1st)||numeric week of the year, 00-53 where Monday is the first day of the week||36|
|%w||Numeric Weekday||numeric weekday, 0-6 where Sunday is 0||5|
|%X||Time||local time representation||05:35:10|
|%x||Date||local date representation||10/02/98|
|%Y||Year with Century||year with century||1998|
|%y||Year without Century||year without century, 00-99||98|
|%%||Percent Sign||% (use when stamp must include a percent symbol)||%|
Note: Entries that do not have a drop-down list name need to be entered by typing in the Text pane of a StampPDF window. The %i(<info field name>) variable supports Keywords as well as Author, Title, and Subject, though it is not available in the drop-down list.
The variable %<page number>g is the one you will need to use to stamp page numbers. On the first page that you stamp using %g StampPDF will stamp a 1. If you do not want to start stamping at page 1, you may modify the page stamp variable by placing a number in front of the g, the number of the page at which you want stamping to begin.
For example, if you would like page numbering stamps to begin on the 5th page with a page-number of 7, you need to tell StampPDF two things:
- The first page to get the stamp — enter 5 in the Start Page field.
- The number to use when stamping that page — enter %7g in the Text area.
In the event that you would like pages to start numbering at 5 from the first page, simply change the Start Page field to 1 and set the Text parameter as %5g.
Using a number with %g is not required. To start stamping with the number 1, use %g with no numeral before the g.
With Bates notation six digits are used for each page number. Any number less than six digits is filled with leading zeros. For example, page 2 will be written as 000002 and page 4145 will be written as 004145.
Bates numbering works similarly to regular page numbering as described in the above section. The variable used for Bates numbering is %J. If you would like to start numbering at a number other than 000001, place the number in between the % and J characters. For example, to start numbering at page 000501 use %501J in the Text field. StampPDF will insert the leading zeros.
You may add a prefix to Bates numbers by including the prefix before the variable. For example, CaseABCD%J will stamp the StartPage with CaseABCD000001, the next page with CaseABCD000002, and so on.
Prefixes may be combined with custom start pages. CaseABCD%501J will begin stamping with CaseABCD000501.
StampPDF uses the %n variable to create a new line (or carriage return) wherever you would like to have one. For example, if you would like to stamp a company address as a header, enter the text of the stamp in your Text parameter, including a %n wherever you wish a line break:
(Appligent, Inc.%n22 East Baltimore Avenue%nLansdowne, PA 19050 USA)
The stamp, depending on what font and point size you choose, will look like:
22 East Baltimore Avenue
Lansdowne, PA 19050 USA
There is no limit to the amount of text or number of lines you may use. You are limited only by the size of the page in which you are stamping.
Note: If you will be stamping footers at the bottom of the page be aware that StampPDF begins stamping the first line of your footer at the bottom margin. To prevent your stamp from running off the page increase the bottom margin.
The document description information is viewable in Adobe Acrobat. Select Document > Properties. A pop-up window will appear:
StampPDF can access the information here and stamp it into your PDF file. Take care to specify the variables exactly as they appear in the Description tab of Acrobat’s Document Properties dialog (i.e., exact capitalization and spelling):
Important! For these variables to stamp correctly they must be present in the document’s description fields. If you attempt to stamp the Author field and the Author field is blank in the document description dialog StampPDF will stamp a blank space.
Note: Parentheses must be included in the Text parameter before and after the document description field name, as shown above for StampPDF DE to process these variables correctly.