Customizing Sample Labels
⭐ This is a premium feature. Please click here for more information.
Label Settings
The Label Settings screen controls how labels are generated and printed in in LabHQ. It allows you to define a configuration for the label, and the ZPL code that is generated.
Most organisations can quickly configure labels by selecting one of the supplied Sample Label Presets, which automatically configure the label size, layout, and, where applicable, barcode type for common label formats.
For more advanced requirements, you can use the Advanced Settings section to customize the underlying label configuration and ZPL code.
Note: This screen is intended for users with technical knowledge of labels and printing. Familiarity with ZPL code is recommended.

Accessing Label Settings
To access Label Settings, you must have the Label Settings: Manage permission.
To open Label Settings:
- Open System Settings.
- Select Labels.
How to Access Label Settings
To access Label Settings, your must have the Label Settings:Manage permission.
If you have the required permission:
- Open System Settings and then select Labels.
Sample Label Presets
Sample label presets provide a quick way to configure labels without needing to manually edit the label template.
Each preset displays a preview showing how the printed label will look, together with details including:
- Label name
- Label size
- Barcode type (where applicable)
Available presets include a variety of common label sizes and layouts, including:
- Code 128 barcodes
- Code 39 barcodes
- QR codes
- Data Matrix codes
- Non-barcode labels
This allows you to quickly select a template suitable for your labels and printer.
Non-barcode templates are ideal when labels only need to display sample information as text, or where barcode scanning is not required.

Applying a Preset
To apply a preset:
- Browse the available label presets.
- Click Apply This Template.
- Review the confirmation message.
- Select OK to overwrite your current label configuration.

Note: Applying a preset replaces your current label settings, including any custom template configuration and ZPL code that has not been saved elsewhere.
After applying a preset, click Save to make the change permanent.
Selecting a preset automatically configures the recommended layout and print settings for that label type.
Advanced Settings
Most users will not need to modify the advanced settings.
The Advanced Settings section allows experienced users to fine-tune label dimensions, print settings and the underlying ZPL.
To access these settings:
- Expand Advanced Settings.
- Configure the required options.

Note: These settings are intended for users with technical knowledge of label printing and Zebra Programming Language (ZPL).
Template Configuration
The Template Configuration section defines the core properties of the label template.
These settings control how labels are generated and interpreted by the rendering engine.
Width and Height
The Width and Height settings define the physical dimensions of the label.
These values should match the size of your labels.
If the dimensions are incorrect:
- Content may be clipped.
- Labels may appear stretched or compressed.
- Printed elements may become misaligned.
Units
The Units setting determines how Width and Height are interpreted.
Available options include:
- Millimetres (mm)
- Centimetres (cm)
- Inches (in)
It is recommended that you use the same measurement units provided by your label manufacturer.
Label Density (Print Resolution)
Label Density controls how many printed dots are used per millimetre.
Higher densities produce sharper output but require compatible printers.
Available options include:
- 6 dots/mm
- 8 dots/mm (recommended)
- 12 dots/mm
- 24 dots/mm
For most label printers, 8 dots/mm provides the best balance between quality and compatibility.
Important: Changing label density affects the rendered size of all label elements.
Printer Support and Limitations
Not all printers support all label densities.
Most printers are designed to print at one or more fixed resolutions. If you select a density higher than your printer can reliably reproduce, the printer may automatically downscale the output.
For best results, use 8 dots/mm for most standard and office printers. Use higher densities only if your printer documentation explicitly supports them. If unsure, start with 8 dots/mm and adjust if needed.
Print Quality
Print Quality controls how images and graphics are rendered.
Available options:
Bitonal
Produces black-and-white output only.
Recommended for:
- Text
- Barcodes
- Simple graphics
Grayscale
Allows multiple shades of gray. Produces smoother images and better visual quality for graphics.
Recommended for:
- Logos
- Images
- More detailed graphics
Note: Print Quality affects PDF rendering only. Native ZPL printers may not support grayscale printing.

Label Template
The Label Template section contains the HTML template used to generate the final ZPL output.
Most users will not need to modify this template directly.

ZPL Code
The ZPL Code section allows advanced users to edit the generated Zebra Programming Language (ZPL). For further reading and detailed documentation on ZPL, visit: https://labelary.com/docs.html.
This provides complete control over:
- Text placement
- Fonts
- Barcodes
- Graphics
- Label layout
A default template is supplied with LabHQ.
Depending on the selected preset, the generated ZPL may include barcode commands or consist entirely of text-based label elements.

If required, you can restore the default template by clicking the Undo (↩) button.
Data Tokens
Data Tokens allow dynamic sample information to be inserted into labels.
Tokens are written using double curly braces, for example:
{{SampleId}}
When a label is printed, each token is automatically replaced with the corresponding sample data.
Available tokens are displayed in the Data Tokens panel. Clicking a token inserts it into the ZPL code at the current cursor position. Recognized tokens are highlighted within the editor.

Test Printing
The Test Print feature allows you to preview or print a label using sample data.
If your template contains data tokens, you will be prompted to enter test values. Each token is requested only once, even if it appears multiple times within the template.
If a value is left blank, a hyphen (- ) is used instead.
Selecting Remember these values stores the entered values for future test prints.

Saving Changes
After making changes to your label configuration:
- Click Save.
- Your updated label settings become the active configuration for sample label printing.
Missing Data
If a field referenced by a data token contains no value when a label is generated, LabHQ automatically displays a hyphen (- ) in its place.
This ensures labels remain readable and consistently formatted even when optional information is unavailable.
Useful Documentation
For additional help and reference when working with labels and ZPL code, the following resources are recommended:
- Introduction to ZPL: https://labelary.com/zpl.html - A beginner-friendly introduction to Zebra Programming Language.
- ZPL Command Reference: https://labelary.com/docs.html - Detailed documentation of ZPL commands.
- Printer Manufacturer Manuals: Your printer's manual often includes recommended settings for label size, density, and print quality.
Tip: Refer to these resources when creating complex labels, using advanced ZPL features, or troubleshooting print issues.