2D Bar Code Module Documentation

This article describes the use of the 2D Bar Code Module for DesignMerge software to create variable 2D bar codes. The 2D Bar Code Module is an optional component of the DesignMerge Pro and DesignMerge Catalog software packages that allows for the placement of fully variable 2D bar codes in an Adobe InDesign document. The module currently supports the creation of QR Code, Data Matrix, and PDF417 bar codes. Special instructions are also provided for GS1 Data Matrix codes.

CHECK YOUR INDESIGN VERSION

The instructions presented here are for Adobe InDesign 2022 and newer versions of the software. If you are running Adobe InDesign 2021 or any older version, please click here to visit the Legacy Bar Code documentation on this site.

BAR CODE TRAINING VIDEO

A complete bar code training video is available on this site. The video includes a brief introduction to bar coding in general, followed by several in-depth examples that take you through the process of creating and styling both Linear and 2D bar codes. Please click here to access the Bar Code Training Video on this web site.

LOOKING FOR LINEAR BAR CODE SUPPORT?

The remainder of this document contains details specific to producing 2D Bar Codes with DesignMerge software. For information about the creation of Linear Bar Codes, please click here to view the Linear Bar Code Module documentation on this site.

BAR CODE FONTS

All of the Linear and 2D bar code formats supported by DesignMerge are font-based. The Linear and 2D Bar Code Module licenses include access to a royalty-free set of bar code fonts. These fonts are licensed for use only with DesignMerge software in conjunction with the optional Linear or 2D Bar Code Modules, and should not be used for any other applications. You must install this set of fonts in order to create variable bar codes using DesignMerge software.

Where to Download Bar Code Fonts

The Linear and 2D Bar Code Module fonts should have been included in the download for your DesignMerge software installer. If you do not have the bar code fonts, please click here to download the fonts now. Please install the 2D bar code font before proceeding with the remainder of this document. If you are also running the Linear Bar Code Module, please install all of the linear bar code fonts as well.

HOW TO CREATE A VARIABLE 2D BAR CODE

This section covers the basics of creating a 2D bar code using the QR Code format as an example. The other supported 2D formats (Data Matrix and PDF417) are created in exactly the same fashion (just select a different bar code Type using the popup menu, as described below).

Step 1 – Create a Placeholder 2D Bar Code

To place a variable 2D bar code in an InDesign document, you will first create an InDesign text frame that is roughly the size of the bar code you wish to create. After creating the text frame, you will use the 2D bar code module interface to create an initial, static 2D bar code in the frame (also referred to as a placeholder 2D bar code). Finally, to make the code variable, you simply tag the text frame using DesignMerge software and assign a variable link that contains the data you wish to encode. To place a QR Code in an InDesign document, please follow the steps below.

  1. Create a text frame in the document for the QR Code.
    Drag out a normal InDesign text frame, and then size this text frame to the size that you wish for the QR Code (you can always re-size it later, as described below).

  2. Select the text frame.
    You may select the text frame by clicking on the frame with the InDesign Selection tool, or by using the Type tool to place a text insertion point inside the frame.

    If there is any content in the text frame, it will be automatically removed when you place the 2D bar code inside this frame. If you accidentally create a 2D Code in the wrong text frame, don’t worry - you can always use Undo to restore the frame.
  3. From the DesignMerge menu, select Options > 2D Bar Code Module > Create...
  4. Select options on the Create 2D Bar Code window.
    Click the Defaults button to use the default options for this example (all of the options are covered in detail later on). For QR Codes, be sure to choose QR Code in the Type popup menu. If you are unsure about a particular value, please leave the selection set to the default option.



  5. Enter the data to encode.
    In the Data edit box, type in the data that you want to encode. In the above example, the URL http://www.meadowsps.com will be encoded. This means when the code is scanned by a Smartphone, it will open the encoded URL. You may enter any data that you wish to encode. For information about using a Template for the data for a 2D bar code, see the Template section below.
    The amount of data you enter when creating the initial 2D bar code will also affect the overall size of the code. Therefore, we recommend the data value you enter to create the initial code be representative of the data that you intend to merge from the data file (for example, if you are merging URL data, then enter a full URL for the initial data, as described above).
  6. Click OK to create a QR Code.
    After filling in all of the options, click the OK button and your QR Code will be created and will now appear in the selected text frame. Also, if your document is showing frame edges, you will see a green icon indicating this frame contains a 2D bar code, as shown in the picture below.
  7. Make the code variable.
    At this point, you have created a default or placeholder 2D bar code. The code is valid, and if all you need is a one-off, static bar code then you are done at this point. If you will be creating variable 2D bar codes with DesignMerge software, please proceed to the next section.

Step 2 – Assign a Variable Link to the Text Frame

To create a variable 2D bar code, you start by creating a placeholder 2D bar code in the normal fashion as described in the previous section. All of the parameters that you have assigned to the code, including the specified Sizing and Position options, will be respected when merged with DesignMerge software.

To make the 2D bar code variable, you simply tag the 2D bar code text frame using DesignMerge software and assign a variable link that contains the data to be encoded. The data will be read from the assigned variable link, and DesignMerge will use that data to automatically create a new 2D bar code. To make a 2D bar code variable, please follow the steps below.

  1. Use the InDesign Selection tool to select the 2D bar code placeholder frame.
    Click to select the 2D bar code placeholder frame that you created in the previous step. You must use the Selection tool so DesignMerge software will tag the entire frame.
  2. On the DesignMerge panel, select a variable link to assign and click the Tag Frame button.
    With the text frame selected, choose the variable link (and optional rule) that you wish to assign to the text frame, and click the Tag Frame button on the DesignMerge panel. Below is a picture showing an example of assigning a variable link named PURL to a text frame that contains a placeholder 2D bar code.

    Once you have tagged the frame, if the frame edges are visible, you sill see another icon next to the 2D bar code icon indicating that the frame has now been tagged as variable, as shown in the picture below.



  3. Start the DesignMerge merge session.
    With the frame tagged for variable data, you are now ready for DesignMerge to produce variations of this 2D bar code. Simply start the DesignMerge merge session as you normally would. The variable link (and optional Rule) assigned to the text frame will control the data that is encoded by the 2D Bar Code Module. As DesignMerge processes each record of the data file, it will pass the data to be encoded to the 2D Bar Code Module. The data will be encoded, and a new 2D bar code will be generated and positioned within the frame. All of the previously specified styling for the frame will be fully retained.

Note for DesignMerge Catalog Users: To create a variable 2D bar code, please follow the same steps outlined above. When tagging the frame, you should assign a Search Key and Variable Link that will serve look up the data value to be encoded as a 2D bar code.

RE-SIZE AND ADJUST THE 2D BAR CODE

If you want to simply re-size an existing 2D bar code, first adjust the text frame that contains the 2D bar code to the desired size. If you hold down the Shift-Command keys as you drag out the handle for the frame, the 2D bar code will resize proportionately along with the text frame.

As an alternative, after resizing the text frame, you can edit the 2D bar code settings (DesignMerge > Options > 2D Bar Code Module > Edit...) and change the Sizing and Position options. Clicking OK will recreate and size the code using the selected Sizing and Position options.

Note on Point Size: To ensure that the bar codes will scan properly, we recommend that you do not manually adjust the point size, leading, or any other attribute that may affect the sizing or positioning of the bar code characters (e.g. tracking). Since the 2D bar codes are font-based, they require very specific point size and leading (the text must be set solid, where the point size and leading are identical). The correct point size and leading values are automatically determined for you and applied by the 2D Bar Code Module. Note that you are free to adjust other attributes of the bar code font, such as color.

2D BAR CODE SETTINGS

This section describes the various settings that are available when creating a 2D bar code.

SIZING AND POSITION

Each of the 2D bar code formats provide a Sizing and Position popup menu which will allow you select how the 2D bar code will be positioned within the text frame, as shown in the picture below:

Each of the available Sizing and Position options are described below:

Sizing Options


Shrink to Fit (Default Option)

This selection will automatically reduce the size of the bar code to fit within the text frame only if the resulting code is too large to fit within the frame. This is the default option and will generally provide the best performance.

Standard
This selection creates the code at the standard point size of 9 point with matching leading value.

Current
This selection will always use the current point size assigned to the code. Use this selection if you wish to manually apply your own point size to the code. Please note that because the code will not be resized automatically, this may result in an overset condition if the code becomes too large.

Size to Fill
This selection will automatically resize the code each time to fill as much of the text frame as possible. The Size to Fill option may result in slower overall performance.

Position Options

Center (Default Option)
This selection will center the code both horizontally and vertically within the frame.

Current
This selection retains the current horizontal and vertical justification settings that have been applied to the frame.

Other Options
The other selections will serve to position the code within the text frame as indicated by each option’s name (i.e. Top Left positions the code in the top/left corner of the frame, etc.).

OTHER 2D BAR CODE SETTINGS

Each 2D bar code format supports a number of optional settings (for example, the QR Code format supports Encoding, Correction and Version settings). The parameters for these settings are typically defined in the specifications for each format. Additional information about the various parameters that are supported for 2D bar codes may be found in numerous locations on the Internet. For example, you may find helpful information on the following web site pages:

2D Bar Code Information on Wikipedia
QR Code Information
Data Matrix Information
PDF417 Information

Note: If you do not fully understand the settings for a particular bar code, we strongly advise that you use the default options for each code. You can get the default options at any time by clicking the Defaults button that is provided on the 2D Bar Code window.


GS1 DATA MATRIX SUPPORT

The 2D Bar Code Module supports the production of GS1 Data Matrix bar codes. GS1 bar codes of this nature must be encoded by including an FNC1 character at the start of, and at various other points in the data (depending upon the specific data format you wish to encode). To encode an FNC1 character using the 2D Bar Code Module, use the "~1" character string. This set of two characters will automatically be encoded as an FNC1 character when the bar code is generated.

The 2D Bar Code Module also supports a few other special encoding characters that can be embedded directly in your data, or set by a Rule. Following is a list and brief explanation of these characters.

QRCODE AND DATA MATRIX BAR CODES
Character Sequence Description
~1 Encodes the FNC1 character used for GS1 Application Identifiers.
~d### Encodes the specific character of decimal value ###. For example, to encode a Tab character, use ~d009, and for a return character, use ~d013.
~m## Adds a Mod 10 checksum to the encoded data where ## represents the number of chars preceding the tilde. This is required to calculate the Mod 10 check digit.
~f## Adds a Mod 43 checksum to the encoded data where ## represents the number of chars preceding the tilde. This is required to calculate the Mod 43 check digit.
PDF417 BAR CODES
Character Sequence Description
~### Encodes the specific character of decimal value ###. For example, to encode a Tab character, use ~009, and for a return character, use ~013.

WORKING WITH 2D BAR CODE TEMPLATES

When you create a 2D bar code, you must enter into the Data edit box on the main window the data that you wish to encode. Certain types of data rely upon a specific format that must be adhered to in order for the code to scan properly.

As an example, if you wish to encode Contact information in a QR Code for use with a business card, you might choose either the VCARD or the MECARD format, both of which support contact information. Please click here for more information about using the Template feature to create variable QR Codes in the VCARD, MECARD, or other format.

TESTING YOUR 2D BAR CODES

It is very important to test the 2D bar codes that you create. Depending upon the type of 2D bar code, you may wish to perform different types of tests.

Smartphone App

If you are creating QR Codes, you may wish to use your Smartphone or other device that has an app capable of reading the type of QR Code information you are testing. Apps may be available for other types of 2D bar codes as well.

Hand Held Scanner

For general purpose testing, we recommend the purchase of a bar code scanner, such as the scanner models offered by our partner ID Automation. Please click here to view the scanner selections on their web site.