Bates (Page/Document) Numbering Commands

Bates numbering (also called Bates stamping) is used to number and/or date/time stamp images and documents for future reference. Typically this would be done as and when images and documents are received.

This is mainly used by businesses for identifying receipts and orders and is used extensively by the legal profession when evidence/exhibits must be numbered during the "discovery stage" of preparations for legal action.

There is no standard format for a Bates number although it is common to use 8, 9 or 10 digit numbers with additional identifying text (usually a short identifying prefix or suffix). The Bates number can either uniquely identify every page of every document (with the Bates number incrementing with every page) or just uniquely identify every document (with the Bates number incrementing with every document).

  -BatesFormat
Parameters: format - text (up to 100 characters, if spaces are required in the format then enclose it within quotes) with any combination of special formatting markup characters:
  • BN-B to BN-BBBBBBBBBB inserts the current Bates number, with the number of B's representing the number of leading zeroes that will pad the displayed Bates number if it is less than the number of B's indicated. If you specify a smaller number of digits, eg BBBB, than the actual number, eg 50423, then the full Bates number will be displayed in it's entirety.
  • PG-P to PG-PPPP inserts the current page number of the PDF, with the number of P's representing the number of leading zeroes that will pad the displayed page number if it is less than the number of P's indicated. If you specify a smaller number of digits, eg PP, than the actual number, eg 132, then the full page number will be displayed in it's entirety.
  • DT-DD, DT-D inserts the current day of the month (1 to 31), with the number of D's representing the number of leading zeroes that will pad the displayed day number if it is less than the number of D's indicated. If you specify a smaller number of digits, eg D, than the actual number, eg 12, then the full day number will be displayed in it's entirety.
  • DT-Day, DT-DAY, DT-Dy, DT-DY inserts the name of the current day of the week, eg DT-Day=Monday, DT-DAY=MONDAY, DT-Dy=Mon and DT-DY=MON. Note: The actual full and abbreviated day names are retrieved from the current system locale information, if this is not available then it reverts to the English names.
  • DT-MM, DT-M inserts the current month in the year (1 to 12), with the number of M's representing the number of leading zeroes that will pad the displayed month number if it is less than the number of M's indicated. If you specify a smaller number of digits, eg M, than the actual number, eg 11, then the full month number will be displayed in it's entirety.
  • DT-Month, DT-MONTH, DT-Mon, DT-MON inserts the name of the current month of the year, eg DT-Month=January, DT-MONTH=JANUARY, DT-Mon=Jan and DT-MON=JAN. Note: The actual full and abbreviated month names are retrieved from the current system locale information, if this is not available then it reverts to the English names.
  • DT-YEAR, DT-YY inserts the current year, eg DT-YEAR=2007, DT-YY=07.
  • TM-HH, TM-H inserts the current hour of the day (0 to 23), with the number of H's representing the number of leading zeroes that will pad the displayed hour number if it is less than the number of H's indicated. If you specify a smaller number of digits, eg H, than the actual number, eg 19, then the full hour number will be displayed in it's entirety.
  • TM-Hh, TM-h inserts the current hour of the day (0 to 12, values larger than 12 wrap around to 1, so 13 becomes 1, 14 becomes 2 etc), with the number of H's representing the number of leading zeroes that will pad the displayed hour number if it is less than the number of H's indicated. If you specify a smaller number of digits, eg H, than the actual number, eg 10, then the full hour number will be displayed in it's entirety.
  • TM-AMPM, TM-ampm inserts either AM/am or PM/pm depending on the current hour in the day, 0-11=AM, 12-23=PM.
  • TM-MM, TM-M inserts the current minute of the hour (0 to 59), with the number of M's representing the number of leading zeroes that will pad the displayed minute number if it is less than the number of M's indicated. If you specify a smaller number of digits, eg M, than the actual number, eg 53, then the full minute number will be displayed in it's entirety.
  • TM-SS, TM-S inserts the current second of the minute (0 to 59), with the number of S's representing the number of leading zeroes that will pad the displayed second number if it is less than the number of S's indicated. If you specify a smaller number of digits, eg S, than the actual number, eg 27, then the full second number will be displayed in it's entirety.
  • Notes:
  • You don't have to specify any of the special markup formatting above, you could just have your company name, a copyright message or some general text (eg DRAFT, CONFIDENTIAL etc).
  • If you just want each page numbered then just use PG-P.
  • You can create quite complex "Bates" numbers, eg "(c) Acme DT-YEAR, BN-BBBBBBBBBB-PG-PPPP [DT-MM/DT-DD/DT-YY TM-HH:TM-MM:TM-SS]" would appear as "(c) Acme 2007, 0001234567-0003 [01/31/07 14:06:29]"

  •   -BatesLocation
    Parameters: vertical alignment - must be one of the following values:
  • Top
  • Middle
  • Bottom

  • horizontal alignment - must be one of the following values:
  • Left
  • Center
  • Right

  • text orientation - must be one of the following values:
  • 0
  • 90
  • 180
  • 270

  • margin - must be between 0.0 and 100.0 points inclusive (this is not used if the alignment is Middle and Center).
    Notes:
  • This command is optional and specifies the location that the Bates "number" is displayed on each page of the output PDF document.
  • A margin between the Bates "number" and the edge of the page can be specified if required.
  • If you do not want the Bates "number" to obscure part of the page then use the border commands (-Border, -BorderLeft, -BorderTop, -BorderRight, -BorderBottom, -BorderColor) to add space around the image that the Bates "number" can be displayed within.
  • If not specified a default of Bottom, Right, 0, and 0.0 are used.
  • 1 point is 1/72 inch.

  •   -BatesFont
    Parameters: font point size - must be between 1 and 300 inclusive.
    font name - must be one of the following standard PDF fonts (which are also known as base14 fonts):
  • Courier
  • Courier-Bold
  • Courier-BoldOblique
  • Courier-Oblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Oblique
  • Times-Roman
  • Times-Bold
  • Times-Italic
  • Times-BoldItalic
  • Symbol
  • ZapfDingbats
    text color - see text style below for an explanation of it's use. This can be specified in one of the following three ways, just choose the method that you are most comfortable with:
  • #RRGGBB - HTML color specification, uses hexadecimal notation to define the amount of red (RR), green (GG) and blue (BB) in a color. These values are between 0 (hexadecimal 00) and 255 (hexadecimal FF) inclusive. Click here for more information and examples with hexadecimal colors.
  • R G B - decimal colour specification, uses normal decimal notation to define the amount of red (RRR), green (GGG) and blue (BBB) in a color. These values are between 0 and 255 inclusive. Click here for more information and examples with decimal colors.
  • R.R G.G B.B - real colour specification, used real number notation to define the amount of red (R.R), green (G.G) and blue (B.B) in a color. These values are between 0.0 and 1.0 inclusive. Click here for more information and examples with real colors.
    text style - must be one of the following:
  • normal - has the text filled in with the required text color
  • stroke - has the text filled in with the required text color and the outline of each letter is "stroked" in the extra color
    extra color - specified if text style is stroke. See above for color specification.
  • Notes:
  • This command is optional and controls the display of the Bates "number".
  • If not specified a default of 10 point Times-Roman black normal text is used.

  •   -BatesFile
    Parameters: filename - specifies the name and location of the file to store the Bates number in, if spaces are required in the filepath then enclose it within quotes.
    Notes:
  • This command is optional but is useful if you want to have sequential numbering continue automatically between documents.
  • If the file does not exist it will be created automatically when the first Bates "number" is output in the PDF document.
  • This file records the last used Bates number, when it is read in the number is incremented before it is used and stored back in the file.

  •   -BatesNumber
    Parameters: initial value - must be a value between 0 and 4294967295 inclusive.
    Notes:
  • This command is optional and defines the initial Bates number (BN-B) used.
  • If the -BatesFile command has been used (see above) and the filename specified contains a number then then this command is ignored as the next Bates number to use is based on the value in the filename give. If the file does not exist or is empty, then this value is used and will be recorded in the filename specified for later use.
  • If not specified a default value of 1 is used.

  •   -BatesIncrement
    Parameters: value - must be between 0 and 1000000.
    Notes:
  • This command is optional and defines the amount by which the Bates number is incremented with use.
  • When the Bates number exceeds 4294967295 after being incremented it resets to start again with 1.
  • If a value of zero is used this has a special meaning in that the Bates number is not incremented per page in the PDF document but incremented by 1 each time a new PDF is created (no matter how many pages might be in the document).
  • If not specified a default value of 1 is used.

  •   -BatesBackground
    Parameters: shape - must be one of the following values:
  • FilledRectangle - both the background and border colors are used
  • OutlineRectangle - just the border color is used
    background color - can be specified in one of the following three ways, just choose the method that you are most comfortable with:
  • #RRGGBB - HTML color specification, uses hexadecimal notation to define the amount of red (RR), green (GG) and blue (BB) in a color. These values are between 0 (hexadecimal 00) and 255 (hexadecimal FF) inclusive. Click here for more information and examples with hexadecimal colors.
  • R G B - decimal colour specification, uses normal decimal notation to define the amount of red (RRR), green (GGG) and blue (BBB) in a color. These values are between 0 and 255 inclusive. Click here for more information and examples with decimal colors.
  • R.R G.G B.B - real colour specification, used real number notation to define the amount of red (R.R), green (G.G) and blue (B.B) in a color. These values are between 0.0 and 1.0 inclusive. Click here for more information and examples with real colors.
    border color - see above for color specification.
  • Notes:
  • This command is optional and if not specified no background is displayed behind the Bates "number".