How to Create a Royal Mail Mailmark® 2D Bar Code

This document describes the appropriate settings for the AccurioPro VDP 2D Bar Code module for creating static or fully variable Royal Mail Mailmark® 2D bar codes. IMPORTANT: Please be sure you are running AccurioPro VDP 2026 v21.92b3 or newer to ensure correct encoding for Mailmark bar codes.

ABOUT ROYAL MAIL MAILMARK BAR CODES

A 2D Mailmark barcode is a type of Data Matrix bar code that must be added to mail pieces in order to access the Mailmark options of the Retail and Network Access product portfolios. At a high level, Mailmark barcodes can be either 2-Dimensional Complex Mail Data Mark Mailmark barcodes (2D Mailmark barcodes in Data Matrix format) or 4-state Mailmark barcodes. This document describes the creation of 2D Mailmark barcodes only.

There are three types of 2D Mailmark barcodes available (types 7, 9 and 29) and they offer varying quantities of space for non-Royal Mail use. The three types are summarized below:




The full specification for the Mailmark barcodes can be downloaded here.

IIMPORTANT NOTE ABOUT MAILMARK BARCODE DATA PADDING

Some Royal Mail Mailmark barcode formats require data values to contain a specific number of characters. In certain cases, the data provided for encoding may include trailing spaces, also referred to as padding characters, to meet the required data length. These padding spaces are part of the barcode data and must be preserved to ensure that the barcode is generated correctly.

For example, the following data string contains the required 51 characters for a Type 7 Mailmark barcode. The final 13 character positions are padded with spaces:

"JGB 012100062400091032G812TF1E 0WN74LQ             "

Note: The quotation marks are included for illustration only and should not be included in the actual barcode data.

How Trailing Spaces Can Affect Mailmark Barcodes

By default, AccurioPro VDP automatically removes trailing spaces from data values read directly from a database field. This behavior is controlled by the Trim Spaces from Data preference.

While this feature is useful for most variable data applications, it can cause problems when processing Mailmark barcode data that requires trailing spaces.

In the example above, removing the 13 trailing spaces would reduce the data length from 51 characters to 38 characters, resulting in an invalid Mailmark barcode.

To prevent this issue, the required padding spaces must either be preserved when reading the original data or added back before the barcode is generated.

Recommended Solution for Data Padding

AccurioPro VDP provides several methods for preserving or adding padding spaces, including:

  • Disabling the Trim Spaces from Data preference to preserve spaces contained in the original database values.
  • Using the Variable Link Suffix setting to append the required spaces automatically.
  • Using a AccurioPro VDP Link Rule with the Add Suffix action to append spaces during processing.

We generally recommend leaving the Trim Spaces from Data preference enabled and using a Variable Link Suffix or Link Rule to add the required padding spaces. This approach preserves the normal handling of other database fields while ensuring that the barcode data retains its required length.

Important: The Trim Spaces from Data preference applies only to the original data value when it is first read from the database field. Any spaces added afterward, such as those introduced through a Variable Link Suffix or Link Rule, are preserved and will not be removed by AccurioPro VDP. For additional details about leading and trailing spaces, please refer to the related article:

Working with Leading and Trailing Spaces in AccurioPro VDP Data Values

Important: Preserving the required data length is essential, but it does not guarantee that the resulting barcode meets all Royal Mail Mailmark specifications. The final barcode should always be validated using an appropriate barcode verification method.

DESIGNMERGE 2D BAR CODE MODULE SETTINGS

In order to create a Mailmark bar code that corresponds to the specific type, you must enter the correct parameters in the AccurioPro VDP 2D bar code module dialog window. Most importantly, the Encoding must be set to C40, which allows for upper-case alpha characters, digits, and the SPACE character.

Please keep in mind that each of the code types listed below also has certain character encoding limitations. If you attempt to encode invalid data, or data that contains too many characters, then the bar code may appear different than the examples presented above.

Following are the correct settings for each 2D Mailmark type.

TYPE 7

Example Data to Encode: JGB 010123456712345678AB12CD30123456789012345678901

TYPE 9

Example Data to Encode: JGB 010123456712345678AB12CD301234567890123456789012345678901234567890123456789012

TYPE 29

Example Data to Encode: JGB 010123456712345678AB12CD3012345678901234567890123456789012345678


HOW TO CREATE A VARIABLE 2D BAR CODE

Now that you know the appropriate 2D Bar Code Module settings for creating a Royal Mail Mailmark bar code, you are ready to use this bar code in a variable data job. For instructions on how to create a variable 2D bar code using AccurioPro VDP software, please see the following link:

How to Create a Variable 2D Bar Code?

 

INVALID LICENSE (NOT REGISTERED FOR ecigcharleston.hesk.com)!