Skip to main content
Skip table of contents

Sizing of barcodes

This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP

The default size at which barcodes are drawn is 1 user unit (point) per module; the physical dimensions will therefore vary depending on the number of modules in the barcode. This is unlikely to be a useful size in most cases, especially for 1D barcodes, which will be drawn as 1pt tall as well as 1pt per module on the width.

Sizing can be specified in one of two primary ways:

  1. Set /HorizontalModuleWidth and /VerticalModuleWidth to define the size of each module in the barcode. This can be useful to draw a barcode as small as possible when you know that your press can print a barcode readably with a module width of 2 device pixels. You might then set these values as “72 600 div 2 mul” or 0.24 on a 600-dpi press. Any minor inaccuracy in the calculation will be corrected for you if set PixelSnapping=true .
  2. Set /TargetWidthHeight . The code will then draw the barcode at the requested size. If PixelSnapping=true it will probably need to enlarge or reduce the barcode slightly, which ensures that all modules use the same number of device pixels. This minimizes the likelihood of failure to read the barcode.

You can use /MaxWidthHeight to ensure that the barcode is not snapped to too large a size, or

/MinWidthHeight to ensure that it’s not snapped to too small a size. As an example, using the same values for /TargetWidthHeight and /MaxWidthHeight will draw the barcode at the largest snapped size that is no larger than the target size.

You can also use the /HorizontalAlignment and /VerticalAlignment keys to position the snapped barcode relative to the nominal position specified for the unsnapped barcode size. This ensures, for instance, that it can be centered relative to other graphics on the output.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.