Barcodes (1D)

<< Click to Display Table of Contents >>

Navigation:  Programming Techniques >

Barcodes (1D)

Previous pageReturn to chapter overviewNext page

[Enhanced Edition and above]

VPE is shipped with a sophisticated barcode library, which allows to create a total of 38 different 1D barcode types.

You can specify whether the labels (i.e. the barcode text in clear) are printed or not and on what position (at the top or the bottom of the barcode).

The library supports automatic checkdigit generation for all barcode types that make use of checkdigits.

Moreover you can specify the aspect ratio between thin and thick modules.

 

ProgrammersManual_img11

 

Modules and Sizing Barcodes

Modules are the black and white lines. The widths of the thin and thick modules have fixed ratios, for example 1:2. This means, thin lines are half as wide as thick lines.

Since there is a fixed aspect ratio, it is obvious that a barcode needs a fixed amount of space depending on its coding scheme and the number of coded characters. A barcode can not be sized freely! It can only be sized in compliance with the aspect ratio.

Example: a given barcode has 63 modules, 43 thick and 20 thin modules, and shall be painted into a rectangle which has a width of 10 cm.

The VPE barcode library now computes the maximum width of a single module, so that all modules will best fit into the given rectangle, while considering the rule that the thin / thick ratio is 1:2. It can happen then that there are wide gaps at the end of the barcode, because it can not fill the given rectangle. The computations are done on pixel level, so the computation is based on the resolution (in DPI) of the output device. Therefore in some cases (for uneven ratios) the width of a printed barcode might differ between output devices with different resolutions.

The preview displays barcodes always drawn in the full rectangle that was supplied, because when drawing to the preview, the barcode library ignores the ratio rule, otherwise - due to the low resolution of the screen - sometimes a barcode would not be shown at all or only in part.

 

Quiet Zone

To the right and left of a barcode is a quiet zone required in the color of the barcode background (normally white). As a rule the minimum value should be the tenfold of a module.

 

Frames Around Barcodes

By default, VPE has selected a pen of 0.3mm width. This causes a frame drawn around barcodes. In order to draw barcodes without a frame, set the PenSize = 0. It is highly recommended to turn off the frame for barcodes.