For the complete documentation index, see llms.txt. This page is also available as Markdown.

1D Barcode

Generating a 1D barcode in your .docx template

This article explains how to turn a column from your monday.com board into a scannable 1D barcode in the document that DocExport generates. It supports two barcode types: Code 39 and Code 128. We first help you decide which one you need, then walk you through the setup once, side by side, for both.

Barcode generation works entirely through free barcode fonts: you write the barcode value as text in a monday.com column and when DocExport generates the document it converts that value into a font that a scanner can read as a barcode.

Board requirement: You need a column that holds the barcode values. This works with both a Text column and a Numbers column.


Which barcode type do you use/need?

Before you set anything up, decide which code is used for your use case. The two types work differently:

  • Code 39 maps each character to a fixed bar pattern, so the font alone can render it. You mark the start and end yourself with an asterisk (*), and there is no checksum. It only supports digits, uppercase letters, and a few symbols (- . $ / + % and space). It is the simplest option and needs no extra tools - but it produces wider codes and can't store lowercase letters.

  • Code 128 is more capable but needs one extra step. It supports the full ASCII range including lowercase letters, is much more compact (it can pack two digits into a single symbol), and includes a mandatory checksum for more reliable scanning. The catch: a font cannot calculate the required checksum and start/stop characters, so you must run your text through an encoder first and store the already-encoded string in your monday.com column.

Use this as a guide

Application area
Often used code
Why

Simple internal product labels (furniture, household goods, basic articles)

Code 39

Short, uppercase/numeric SKUs

Office, files, asset tags, membership/ID cards, event tickets

Code 39

Small data volumes, easy to maintain, works with legacy systems.

Library, archive, schools

Code 39

Long-established standard for short item numbers.

Government, defense, automotive (legacy systems)

Code 39

Historically mandated; still widely supported.

Food & retail packaging (batch, best-before, lot data)

Code 128

Compact and alphanumeric; GS1-128 is the industry standard for this data.

Logistics & shipping (parcels, pallets, cartons)

Code 128

GS1-128 / SSCC shipping codes are built on Code 128 - the global standard.

Warehousing & inventory

Code 128

Long alphanumeric SKUs and location codes fit in little space.

Healthcare (patient wristbands, medication, specimens)

Code 128

Compact alphanumeric codes; reliable thanks to the built-in checksum.

Manufacturing (serial numbers, part tracking)

Code 128

High data density on small components; supports the full character set.

Any code with lowercase letters or many characters

Code 128

Code 39 only supports uppercase and a limited character set.


Step-by-step setup (for both codes)

The steps below work for either barcode type. Where Code 39 and Code 128 differ, you'll see both side by side.

Step 1 – Download and install the font

Download the free font from Google Fonts and install it on the computer where you edit your template. The only difference is which font you install:

Code 39

Code 128

Font (with readable text below)

On the Google Fonts page, click Get font → Download all, unzip the file, and install the .ttf file (double-click → Install).

Want the plain-text value shown below the barcode as well? Use the Text variant of either font. For bars only, use the plain variant.

Step 2 – Prepare the value in your monday.com column

This is the other main difference between the two codes:

Code 39

Code 128

What goes in the column

The plain value, e.g. 12345

The pre-encoded string, e.g. Ì12345zÎ

Extra step needed?

No

Yes — encode the value first

For Code 39: simply enter your value in the column. Remember that only digits, uppercase letters, and - . $ / + % / space are allowed - no lowercase letters.

For Code 128: your column must already contain the data including the start, stop, and checksum characters. A font can't calculate these, so encode your text first using an official encoder.

Enter your plain text, copy the encoded output, and paste exactly that into your monday.com column. Examples:

Desired plain text
Exact Code 128 content of your monday.com column

12345

Ì12345zÎ

123456

Ì1234560Î

Hello

ÌHellomÎ

TEST-123

ÌTEST-123&Î

ABC-99

ÌABC-993Î

The first character (Ì) is the start character (Start B), the last (Î) is the stop character, and the one right before it is the calculated checksum.

The examples above are encoded as Code Set B and are valid and scannable. For pure digit strings, the encoder may output an equivalent, slightly shorter variant (via Code Set C), both read back to the same value. Always use what the encoder gives you.

Step 3 – Insert the placeholder into your template

In both cases, add the placeholder for your barcode column at the desired position in your .docx template:

Step 4 – Add start/stop characters (Code 39 only)

This is the second difference:

Code 39

Code 128

What you type

*{{Barcode}}*

{{Barcode}}

Asterisks needed?

Yes

No

For Code 39, place an asterisk (*) before and after the placeholder. Code 39 needs a defined start and stop marker so the scanner knows where the code begins and ends. The font does not add it automatically. Without the asterisks, the printed code looks like a barcode but cannot be scanned.

For Code 128, leave the placeholder as is. The start and stop are already part of the encoded string from your column, so no asterisks are added.

Step 5 – Apply the barcode font

Select the entire expression and set the font:

Code 39

Code 128

Select this

*{{Barcode}}* (including both asterisks)

{{Barcode}}

Set font to

Libre Barcode 39

Libre Barcode 128

In your template it then looks like this:

Code 39

Code 128

One more tip: Leave a quiet zone: some empty white margin before and after the barcode. As a rule, keep at least 10× the width of the narrowest bar clear on each side; in practice, about 3–5 mm (roughly ⅛–¼ inch) of empty white space left and right is a safe minimum. If the code sits right against text or a border, the scanner can't capture it cleanly. When testing on a screen you may also run into read issues (glare, anti-aliasing) - when in doubt, print the code out briefly.

Step 6 – Embed the font when saving the .docx

So the barcode is generated correctly even when the font is not installed on the DocExport server, you must embed the font in the .docx file when saving the document. This applies to both codes.

help-center article "Embedding a font in a .docx template"

Step 7 – Generate the document in DocExport

Generate the document as usual via DocExport. The result now shows a scannable barcode in place of the placeholder, containing the value from your monday.com column.

Download a Starter Template for Code 39 to see how it works:


Quick comparison: Code 39 vs. Code 128

Code 39

Code 128

Column content

Plain text (e.g. 12345)

Pre-encoded text (e.g. Ì12345zÎ)

Asterisks * needed?

Yes, *{{Barcode}}*

No

Encoder needed?

No

Yes (official encoder)

Character set

Digits, uppercase letters, a few symbols

Full ASCII incl. lowercase letters

Font

Libre Barcode 39

Libre Barcode 128


Related articles

Last updated