Sign in Join
Wiki copytemporary

LazBarcodes

General

About

LazBarcodes is a set of controls to create 1D and 2D barcodes. The backend engine is a port of Zint at sourceforge. Some units were heavily refactored to obtain a more Pascal-like code.

The library supports the generation of 1D and 2D barcodes:

Author

2011 - Jose Mejuto

License

BSD 3 as it is being inherited from the zint source code.

Dependencies / System Requirements

Getting LazBarcodes

The download contains the packages lazbarcodes and lazbarcodes_runtimeonly. The first one gives you visual components of the above barcodes and the second can be used just to access the ported zint code for advanced barcode generation.

Development version

The latest source code can be found on Lazarus-CCR. Use SVN to load the source files, or download the "Snapshot" by clicking on the corresponding button of the sourceforge site and unzip it to some directory. For installation go to "Package" > "Load package file (*.lpk)", navigate to the folder with the downloaded sources and load the fole lazbarcodes_runtimeonly.lpk. Then load the package lazbarcodes.lpk. Click "Use" > "Install", and confirm the question to rebuild the IDE. After some time the IDE restarts, and you find the barcodes in the "LazBarcodes" tab of the component palette.

Release version

Occasionally a release version is prepared and made available for easy installation by means of the Online-Package-Manager in the Lazarus IDE. Open "Package" > "Online package manager", check the item "LazBarcodes" in the list and click "Install". Again, confirm the question to rebuild the IDE. When the IDE restarts after some time you find the barcodes in the "LazBarcodes" tab of the component palette.

Change Log

Documentation

General

The components installed by the LazBarcodes package descent from TGraphicControl and thus inherit fundamental control properties such as Width, Height, AutoSize, etc. They share a variety of other properties and methods; some properties, however, are not published fwhen they are not appropriate for the current barcode type.

Properties

Methods

Components

1D codes

<thead>

</thead> <tbody>

<img src="tbarcode2of5.png" title="tbarcode2of5.png" alt="tbarcode2of5.png" /></td>

Matrix 2-of-5</td>

photo finishing<br /> airline ticket marking</td>

photo developing envelopes<br /> warehouse sorting systems</td>

cartons of some products</td>

<img src="tbarcode3of9.png" title="tbarcode3of9.png" alt="tbarcode3of9.png" /></td>

<code>bctLOGMARS</code></td>

LOGMARS</td>

industrial applications<br /> LOGMARS: different bar widths</td>

<code>'–', '.', '$', '/', '+', '%'</code></td>

(C39ext)</td>

industrial applications</td>

<img src="tbarcodec11.png" title="tbarcodec11.png" alt="tbarcodec11.png" /></td>

<img src="tbarcodec128.png" title="tbarcodec128.png" alt="tbarcodec128.png" /></td>

GS1-128</td>

to be given in square parenthesis</td>

<img src="tbarcodechannelcode.png" title="tbarcodechannelcode.png" alt="tbarcodechannelcode.png" /></td>

<img src="tbarcodeean.png" title="tbarcodeean.png" alt="tbarcodeean.png" /></td>

<code>'+'</code> for addon code</td>

<code>'+'</code> for addon code</td>

<code>'+'</code> for addon code</td>

plus 2 check digits</td>

(more compact than UPC/A)</td>

<code>'+'</code> for addon code</td>

<img src="tbarcodemedical.png" title="tbarcodemedical.png" alt="tbarcodemedical.png" /></td>

<img src="tbarcodeplessey.png" title="tbarcodeplessey.png" alt="tbarcodeplessey.png" /></td>

(see <code>CheckChar</code> property below)</td>

<img src="tbarcodepostal.png" title="tbarcodepostal.png" alt="tbarcodepostal.png" /></td>

<a href="http://fileformats.archiveteam.org/wiki/Australia_Post_standard_customer_barcode">http://fileformats.archiveteam.org/wiki/Australia_Post_standard_customer_barcode</a></td>

<code>'A'</code>: Ascender<br /> <code>'F'</code>: Full height<br /> <code>'T'</code>: Tracker (short bar)</td>

<img src="tbarcodetelepen.png" title="tbarcodetelepen.png" alt="tbarcodetelepen.png" /></td>

'X' must be at even character position.</td>

</tbody>

Stacked barcodes

<thead>

</thead> <tbody>

<img src="tbarcodepdf417.png" title="tbarcodepdf417.png" alt="tbarcodepdf417.png" /></td>

Compact PDF417</td>

</tbody>

2D codes

<thead>

</thead> <tbody>

<img src="tbarcodeaztec.png" title="tbarcodeaztec.png" alt="tbarcodeaztec.png" /></td>

<img src="tbarcodeaztecrune.png" title="tbarcodeaztecrune.png" alt="tbarcodeaztecrune.png" /></td>

<img src="tbarcodedatamatrix.png" title="tbarcodedatamatrix.png" alt="tbarcodedatamatrix.png" /></td>

<img src="tbarcodeqr.png" title="tbarcodeqr.png" alt="tbarcodeqr.png" /></td>

<img src="tbarcodemicroqr.png" title="tbarcodemicroqr.png" alt="tbarcodemicroqr.png" /></td>

<img src="tbarcodemaxicode.png" title="tbarcodemaxicode.png" alt="tbarcodemaxicode.png" /></td>

</tbody>

Special properties of some components

Demo application

A demo project is contained in the LazBarcodes installation. It allows to generate barcode from all barcode types supported. Please note that - since the requirements on length and characters changes from type to type - sometimes error messages are displayed; in this case, click on the "Sample text" button to use a predefined sample text for the selected barcode type. A screenshot is displayed at the top of this page.

Final notes

If you need the generation of another barcode and it is present in Zint, please ask for it in the Lazarus forum or mailing lists.


From the Free Pascal wiki, page "LazBarcodes", as it stood on 2023-09-17 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.