Skip to content

Barcodes and QR codes

Sliick Docs has two blocks for codes that a scanner can read: Barcode (Code 128) and QR Code. Sliick Docs draws them itself, with no outside service or stored images. Both work inside a repeat, so you can print a different code on every row, for shipping labels or asset tags.

  1. Click + Add block and pick Barcode or QR Code.
  2. On the right, choose the Merge field whose value the code should hold. To use a field from a parent record, switch Fields from from This record to that parent.
  3. For a QR code, set the width, height and alignment.
  4. For a barcode, choose a Scan quality and an alignment. The width is worked out for you from the data.

A barcode block's settings: the merge field it encodes, the scan quality and the option to print the value underneath

Barcodes work in headers and footers as well as in the body.

How wide a barcode needs to be depends on how much data it holds, which is hard to judge by eye. So instead of a width, you pick a Scan quality:

  • Compact: for screens and clean print.
  • Standard: for most documents.
  • Rugged: for warehouses, labels and fax.

The width then follows from the value being printed.

  • If a value is too long to scan at any quality in the space available, the editor tells you, says how wide it would need to be, and what to change. It never prints something that looks like a barcode but will not scan.
  • If a value is long enough that the code has to be squeezed to fit, you get a warning with two fixes: make the block wider, or shorten the value.

This matters because the narrowest barcodes are made for a printer and a handheld scanner, not a phone camera.

A barcode prints its value as text underneath, so if a scan fails, someone can type it in by hand. This is on by default. Turn off Show the value as text to hide it on a block.

The text shows exactly what the bars hold, which is not always what you typed. Characters a Code 128 barcode cannot hold are turned into spaces, and the printed text shows the same spaces, so the page and the scanner always agree. QR codes do not print a value underneath.

Barcodes and QR codes are PDF-only. A template with either block cannot also make Word documents: Sliick Docs flags it as an error. A common approach is two templates: a PDF version with the barcode, and a Word version without it. See Word output.

Barcodes also work in templates you write in Word, as tags. See Word-file templates.