Sign in Join
Wiki copytemporary

LazBarcodes: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## General
22
3-<figure>
4-<img src="lazbarcodes_demo.png" title="lazbarcodes_demo.png" />
5-<figcaption>lazbarcodes_demo.png</figcaption>
6-</figure>
3+![](/wiki-images/0/0c/Lazbarcodes_demo.png)
74
85### About
96
107*LazBarcodes* is a set of controls to create 1D and 2D barcodes. The backend engine is a port of [Zint](http://sourceforge.net/projects/zint/) at sourceforge. Some units were heavily refactored to obtain a more Pascal-like code.
118
129The library supports the generation of 1D and 2D barcodes:
1310
1411- **1D barcodes**: Code-11, Code-128, Channel code, EAN-128, several 2-of-5 variants, several 3-of-9 variants, EAN, UPC, Plessey, MSI/Plessey, Telepen, medical/pharmaceutical codes (CodaBar, Code-32, Pharma one-track, Pharma two-track, PZN), postal codes (Australian post, Japanese post, Korean Post, Deutsche Post IdentCode and LeitCode, Dutch KIX, Planet, PostNet, Royal Mail RM4SCC)
1512- **Stacked barcodes**: PDF417, compact PDF417, MicroPDF417
1613- **2D barcodes**: QR, MicroQR, Aztec, Aztec Rune, Data Matrix, Maxicode
1714
1815### Author
1916
20172011 - Jose Mejuto
2118
2219### License
2320
2421BSD 3 as it is being inherited from the zint source code.
2522
2623### Dependencies / System Requirements
2724
2825- None
2926
3027## Getting LazBarcodes
3128
3229The 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.
3330
3431### Development version
3532
3633The latest source code can be found on [Lazarus-CCR](https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazbarcodes/). 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.
3734
3835### Release version
3936
4037Occasionally a release version is prepared and made available for easy installation by means of the [[Online Package Manager|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.
4138
4239### Change Log
4340
4441- v2.0.0: Added a lot of 1D barcodes
4542- v1.0.3: Internally used units renamed to avoid naming conflict with CodeTyphon package PL_APE.
4643- v1.0.2: Change of license from GPL to BSD
4744- Initial development.
4845
4946## Documentation
5047
5148### General
5249
5350The 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.
5451
5552#### Properties
5653
5754- `Text: TCaption` - Text to be encoded as a barcode. Note that, depending on the barcode type, there exist limitations on allowed text length and allowed characters.
5855- `ShowHumanReadableText: Boolean` - Displays the encoded text underneath the barcode symbol. Note that the encoding algorithm may add check sum or additional characters to the input text.
5956- `BarcodeType` - Some barcode components can be modified to create various symbologies by selecting the corresponding value in this (type-dependent) enumeration.
6057- `Scale: Integer` - Horizontal scaling factor of the barcode determining the width of the smallest feature (bar or space) in pixels. `Scale=0` tries to select an internal scale value such that the barcode fills the control's width as much as possible. Note that this scaling factor applies to all bars and spaces and therefore, increasing `Scale` does not increase the barcode with gradually but by more or less large steps.
6158- `SymbolHeight: Integer` - Similar to `Scale`, but refers now to the vertical direction. Again, `SymbolHeight=0` fills adjusts the internal symbol height to fill the height
6259- `MinSymbolHeight: Integer` - Prevents the symbol to become too small.
6360- `RecommendedSymbolSize: Boolean` - If `true`, overrides the `Scale` and `SymbolHeight` settings so that the size of the symbol is as close as possible to its specification.
6461- `AutoSize: Boolean` - inherited standard property. When `true`, `Width` and `Height` are selected such that the current size of the barcode is enclosed. Note that `AutoSize=true` is ignored when `Scale=0` or `SymbolHeight=0`.
6562- `Margin: Integer` - Amount of empty pixels added around the symbol
6663- `WhitespaceWidth: Integer` - Amount of empty pixels added to the left and right of some symbologies to enhance readability of barcode scanners.
6764- `BearerBarMode: TBearerBarMode = (bbmNone, bbmBearerBars, bbmBox)` - adds horizontal bars above and below the barcode (`bbmBearerBars`) or a box around the barcode (`bbmBox`). The thickness of the bars and the box border is given by the `Margin` multiplied by the currently used internal `Scale` parameter.
6865- `ForegroundColor: TColor` - Color used to draw the bars
6966- `BackgroundColor: TColor` - Color used to draw the background of the barcode (spaces, margin and text area).
7067
7168#### Methods
7269
7370- `CopyToClipboard` - Copies the barcode to the clipboard as a bitmap
7471- `SaveToFile(const AFileName: String; AImageClass: TFPImageBitmapClass)` - Saves the barcode as a graphic image of the specified class to file.
7572- `SaveToStream(const AStream: TStream; AImageClass: TFPImageBitmapClass)` - Saves the barcode as a graphic image of the specified class to a stream.
7673- `SaveToEPSFile(const AFileName: String)` - Saves the barcode as EPS file
7774- `SaveToEPSStream(const AStream: TStream)` - Saves the barcode in EPS format as stream.
7875- `SaveToSVGFile(const AFileName: String)` - Saves the barcode in SVG format to file
7976- `SaveToSVGStream(const AStream: TStream)` - Saves the barcode in SVG format to a stream
8077- `ErrorString: String` - In case of an error, this read-only property contains a message why the `Text` could not be encoded correctly.
8178
8279### Components
8380
8481#### 1D codes
8582
86-<table>
8783<thead>
88-<tr>
89-<th>Component</th>
90-<th>BarcodeType</th>
91-<th>Name</th>
92-<th>Application</th>
93-<th>Allowed chars</th>
94-<th>Text length</th>
95-<th>Reference</th>
96-</tr>
84+
9785</thead>
9886<tbody>
99-<tr>
100-<td rowspan="6"><code>TBarcode2of5</code><br />
87+
10188<img src="tbarcode2of5.png" title="tbarcode2of5.png" alt="tbarcode2of5.png" /></td>
102-<td><code>bctCode25Standard</code></td>
103-<td>Standard 2-of-5, or<br />
89+
10490Matrix 2-of-5</td>
105-<td>Warehouse sorting<br />
91+
10692photo finishing<br />
10793airline ticket marking</td>
108-<td><code>'0'..'9'</code></td>
109-<td>up to 80</td>
110-<td><a href="https://en.wikipedia.org/wiki/Matrix_2_of_5"><span>https://en.wikipedia.org/wiki/Matrix_2_of_5</span></a></td>
111-</tr>
112-<tr>
113-<td><code>bctCode25DataLogic</code></td>
114-<td>DataLogic 2-of-5</td>
115-<td>Processing and sorting of mail for the Chinese Postal Service</td>
116-<td><code>'0'..'9'</code></td>
117-<td>up to 80</td>
118-<td><a href="https://en.wikipedia.org/wiki/Matrix_2_of_5"><span>https://en.wikipedia.org/wiki/Matrix_2_of_5</span></a></td>
119-</tr>
120-<tr>
121-<td><code>bctCode25IATA</code></td>
122-<td>IATA 2-of-5</td>
123-<td>Airline cargo</td>
124-<td><code>'0'..'9'</code></td>
125-<td>up to 45</td>
126-<td><a href="https://en.wikipedia.org/wiki/Industrial_2_of_5#IATA_2_of_5"><span>https://en.wikipedia.org/wiki/Industrial_2_of_5#IATA_2_of_5</span></a></td>
127-</tr>
128-<tr>
129-<td><code>bctCode25Industrial</code></td>
130-<td>Industrial 2-of-5</td>
131-<td>Cardboard printing<br />
94+
13295photo developing envelopes<br />
13396warehouse sorting systems</td>
134-<td><code>'0'..'9'</code></td>
135-<td>up to 45</td>
136-<td><a href="https://en.wikipedia.org/wiki/Industrial_2_of_5"><span>https://en.wikipedia.org/wiki/Industrial_2_of_5</span></a></td>
137-</tr>
138-<tr>
139-<td><code>bctCode25Interleaved</code></td>
140-<td>Interleaved 2-of-5</td>
141-<td>135 film<br />
142-cartons of some products</tt></td>
143-<td><code>'0'..'9'</code></td>
144-<td>up to 89</td>
145-<td><a href="https://en.wikipedia.org/wiki/Interleaved_2_of_5"><span>https://en.wikipedia.org/wiki/Interleaved_2_of_5</span></a></td>
146-</tr>
147-<tr>
148-<td><code>bctITF14</code></td>
149-<td>ITF-14</td>
150-<td>Packaging levels of a product</td>
151-<td><code>'0'..'9'</code></td>
152-<td>up to 13</td>
153-<td><a href="https://en.wikipedia.org/wiki/ITF-14"><span>https://en.wikipedia.org/wiki/ITF-14</span></a></td>
154-</tr>
155-<tr>
156-<td rowspan="3"><code>TBarcode3of9</code><br />
97+
98+cartons of some products</td>
99+
157100<img src="tbarcode3of9.png" title="tbarcode3of9.png" alt="tbarcode3of9.png" /></td>
158-<td><code>bctCode39</code><br />
159-<code>bctLOGMARS</code></tt></td>
160-<td>Code 3-of-9 (C39)<br />
101+
102+<code>bctLOGMARS</code></td>
103+
161104LOGMARS</td>
162-<td>Name badges, inventory and<br />
105+
163106industrial applications<br />
164107LOGMARS: different bar widths</td>
165-<td><code>'0'..'9', 'A'..'Z', ' ',</code><br />
108+
166109<code>'–', '.', '$', '/', '+', '%'</code></td>
167-<td>up to 74</td>
168-<td><a href="https://en.wikipedia.org/wiki/Code_39"><span>https://en.wikipedia.org/wiki/Code_39</span></a></td>
169-</tr>
170-<tr>
171-<td><tt>bctCode39Ext</td>
172-<td>Extended Code 3-of-9<br />
110+
173111(C39ext)</td>
174-<td>Name badges, inventory and<br />
112+
175113industrial applications</td>
176-<td><code>#0..#127</code></td>
177-<td>up to 74</td>
178-<td><a href="https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39"><span>https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39</span></a></td>
179-</tr>
180-<tr>
181-<td><tt>bctCode93</td>
182-<td>Code-93</td>
183-<td>Canada post</td>
184-<td>like C39</td>
185-<td>up to 107</td>
186-<td><a href="https://en.wikipedia.org/wiki/Code_93"><span>https://en.wikipedia.org/wiki/Code_93</span></a></td>
187-</tr>
188-<tr>
189-<td><code>TBarcodeC11</code><br />
114+
190115<img src="tbarcodec11.png" title="tbarcodec11.png" alt="tbarcodec11.png" /></td>
191-<td></td>
192-<td>Code-11</td>
193-<td>Telecommunication</td>
194-<td><code>'0'..'9', '-'</code></td>
195-<td>up to 121</td>
196-<td><a href="https://en.wikipedia.org/wiki/Code_11"><span>https://en.wikipedia.org/wiki/Code_11</span></a></td>
197-</tr>
198-<tr>
199-<td rowspan="2"><code>TBarcodeC128</code><br />
116+
200117<img src="tbarcodec128.png" title="tbarcodec128.png" alt="tbarcodec128.png" /></td>
201-<td><code>bctC128</code></td>
202-<td>Code-128</td>
203-<td>Industrial applications</td>
204-<td><code>#0..#127</code></td>
205-<td>up to 160</td>
206-<td><a href="https://en.wikipedia.org/wiki/Code_128"><span>https://en.wikipedia.org/wiki/Code_128</span></a></td>
207-</tr>
208-<tr>
209-<td><code>bctEAN128</code></td>
210-<td>EAN-128, or<br />
118+
211119GS1-128</td>
212-<td>Industrial applications</td>
213-<td><tt>#0..#127</td>
214-<td>Depending on "Application identifier"<br />
120+
215121to be given in square parenthesis</td>
216-<td><a href="https://en.wikipedia.org/wiki/GS1-128"><span>https://en.wikipedia.org/wiki/GS1-128</span></a>]</td>
217-</tr>
218-<tr>
219-<td><code>TBarcodeChannelCode</code><br />
122+
220123<img src="tbarcodechannelcode.png" title="tbarcodechannelcode.png" alt="tbarcodechannelcode.png" /></td>
221-<td></td>
222-<td>Channel Code</td>
223-<td>high densitiy codes</td>
224-<td><code>'0'..'9'</code></td>
225-<td>up to 7</td>
226-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Channel_Code.htm"><span>https://barcodeguide.seagullscientific.com/Content/Symbologies/Channel_Code.htm</span></a></td>
227-</tr>
228-<tr>
229-<td rowspan="6"><code>TBarcodeEAN</code><br />
124+
230125<img src="tbarcodeean.png" title="tbarcodeean.png" alt="tbarcodeean.png" /></td>
231-<td><tt>bctEAN</td>
232-<td>EAN-8, EAN-13</td>
233-<td>Article numbers</td>
234-<td><code>'0'..'9'</code><br />
126+
235127<code>'+'</code> for addon code</td>
236-<td>up to 19</td>
237-<td><a href="https://en.wikipedia.org/wiki/International_Article_Number"><span>https://en.wikipedia.org/wiki/International_Article_Number</span></a>]</td>
238-</tr>
239-<tr>
240-<td>| <code>bctEAN14</code></td>
241-<td>EAN-14</td>
242-<td>Trading goods</td>
243-<td><code>'0'..'9'</code></td>
244-<td>up to 13</td>
245-<td><a href="https://www.barcodestalk.com/ean14"><span>https://www.barcodestalk.com/ean14</span></a></td>
246-</tr>
247-<tr>
248-<td>| <code>bctISBN</code></td>
249-<td>ISBN</td>
250-<td>Books</td>
251-<td><code>'0'..'9', 'X'</code><br />
128+
252129<code>'+'</code> for addon code</td>
253-<td>9, 10 or 13</td>
254-<td><a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number"><span>https://en.wikipedia.org/wiki/International_Standard_Book_Number</span></a></td>
255-</tr>
256-<tr>
257-<td>| <code>bctNVE18</code></td>
258-<td>NVE-18</td>
259-<td>Shipping and storage</td>
260-<td><tt>'0'..'9'</td>
261-<td>up to 25</td>
262-<td></td>
263-</tr>
264-<tr>
265-<td>| <code>bctUPCA</code></td>
266-<td>UPC/A</td>
267-<td>Trade items</td>
268-<td><code>'0'..'9'</code><br />
130+
269131<code>'+'</code> for addon code</td>
270-<td>up to 10<br />
132+
271133plus 2 check digits</td>
272-<td><a href="https://en.wikipedia.org/wiki/Universal_Product_Code"><span>https://en.wikipedia.org/wiki/Universal_Product_Code</span></a></td>
273-</tr>
274-<tr>
275-<td>| <code>bctUPCE</code></td>
276-<td>UPC/E</td>
277-<td>Trade items<br />
134+
278135(more compact than UPC/A)</td>
279-<td><code>'0'..'9'</code><br />
136+
280137<code>'+'</code> for addon code</td>
281-<td>up to 7</td>
282-<td><a href="https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E"><span>https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E</span></a></td>
283-</tr>
284-<tr>
285-<td rowspan="6"><code>TBarcodeMedical</code><br />
138+
286139<img src="tbarcodemedical.png" title="tbarcodemedical.png" alt="tbarcodemedical.png" /></td>
287-<td><code>bctCodabar</code></td>
288-<td>Codabar</td>
289-<td>Blood identification</td>
290-<td><code>'0'..'9', '-', '$', ':', '/', '.', '+', 'A', 'B', 'C', 'D'</code></td>
291-<td>up to 60</td>
292-<td><a href="https://en.wikipedia.org/wiki/Codabar"><span>https://en.wikipedia.org/wiki/Codabar</span></a></td>
293-</tr>
294-<tr>
295-<td>| <code>bctCode32</code></td>
296-<td>Code 32 (Italian PHARMACODE)</td>
297-<td>Pharmaceutical products in Italy</td>
298-<td><code>'0'..'9'</code></td>
299-<td>up to 8</td>
300-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Code_32.htm"><span>https://barcodeguide.seagullscientific.com/Content/Symbologies/Code_32.htm</span></a></td>
301-</tr>
302-<tr>
303-<td>| <code>bctPharmaOne</code></td>
304-<td>Pharmacode One-Track</td>
305-<td>Packaging of pharmaceutical products</td>
306-<td><code>'0'..'9'</code></td>
307-<td>up to 6</td>
308-<td><a href="https://barcode-test.com/301/what-is-pharmacode/"><span>https://barcode-test.com/301/what-is-pharmacode/</span></a></td>
309-</tr>
310-<tr>
311-<td>| <code>bctPharmaTwo</code></td>
312-<td>Pharmacode Two-Track</td>
313-<td>Packaging of pharmaceutical products</td>
314-<td><code>'0'..'9'</code></td>
315-<td>up to 8</td>
316-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/TwoTrackPharmacode.htm"><span>https://barcodeguide.seagullscientific.com/Content/Symbologies/TwoTrackPharmacode.htm</span></a></td>
317-</tr>
318-<tr>
319-<td>| <code>bctPZN7</code></td>
320-<td rowspan="2">Pharmazentralnummer (PZN)</td>
321-<td rowspan="2">Identification of pharmaceutical products (Germany, Austria)</td>
322-<td rowspan="2"><code>'0'..'9'</code></td>
323-<td>7 (6 by user + 1 auto-generated check digit)</td>
324-<td rowspan="2"><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/PZN.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/PZN.htm</a></td>
325-</tr>
326-<tr>
327-<td>| <code>bctPZN8</code></td>
328-<td>8 (7 by user + 1 auto-generated check digit)</td>
329-</tr>
330-<tr>
331-<td rowspan="2"><code>TBarcodePlessey</code><br />
140+
332141<img src="tbarcodeplessey.png" title="tbarcodeplessey.png" alt="tbarcodeplessey.png" /></td>
333-<td><code>bctPlessey</code></td>
334-<td>Plessey</td>
335-<td rowspan="2">Shelf tags in retail stores</td>
336-<td><code>'0'..'9', 'A'..'F'</code></td>
337-<td>up to 65</td>
338-<td><a href="https://en.wikipedia.org/wiki/Plessey_Code">https://en.wikipedia.org/wiki/Plessey_Code</a></td>
339-</tr>
340-<tr>
341-<td>| <code>bctMSIPlessey</code></td>
342-<td>MSI/Plessey</td>
343-<td><tt>'0'..'9'</td>
344-<td>depending on checkdigits<br />
142+
345143(see <code>CheckChar</code> property below)</td>
346-<td><a href="https://en.wikipedia.org/wiki/MSI_Barcode"><span>https://en.wikipedia.org/wiki/MSI_Barcode</span></a></td>
347-</tr>
348-<tr>
349-<td rowspan="14"><code>TBarcodePostal</code><br />
144+
350145<img src="tbarcodepostal.png" title="tbarcodepostal.png" alt="tbarcodepostal.png" /></td>
351-<td><code>bctAustraliaPostCustomer</code></td>
352-<td>Australia Post Standard Customer Barcode</td>
353-<td rowspan="4">Postal code and automatic mail sorting in Australia</td>
354-<td><code>'0'..'9', 'A'..'Z', 'a'..'z'</code>, space and hash (<code>'#'</code>)</td>
355-<td>8, 13, 16, 18, or 23</td>
356-<td rowspan="4"><a href="http://www.neodynamic.com/Products/Help/BarcodeWPF3.0/barcodes/AustraliaPost.htm">http://www.neodynamic.com/Products/Help/BarcodeWPF3.0/barcodes/AustraliaPost.htm</a><br />
146+
357147<a href="http://fileformats.archiveteam.org/wiki/Australia_Post_standard_customer_barcode">http://fileformats.archiveteam.org/wiki/Australia_Post_standard_customer_barcode</a></td>
358-</tr>
359-<tr>
360-<td><code>bctAustraliaPostReplyPaid</code></td>
361-<td>Australia Post Reply Paid</td>
362-<td><code>'0'..'9'</code></td>
363-<td>8</td>
364-</tr>
365-<tr>
366-<td><code>bctAustraliaPostRoute</code></td>
367-<td>Australia Post Routing</td>
368-<td><code>'0'..'9'</code></td>
369-<td>8</td>
370-</tr>
371-<tr>
372-<td><code>bctAustraliaPostRedirect</code></td>
373-<td>Australia Post Redirection</td>
374-<td><code>'0'..'9'</code></td>
375-<td>8</td>
376-</tr>
377-<tr>
378-<td><code>bctDAFT</code></td>
379-<td>DAFT Code</td>
380-<td>Generic system of transcribing 4-state barcodes where the data encoding is provided by an external program.</td>
381-<td><code>'D'</code>: Descender<br />
148+
382149<code>'A'</code>: Ascender<br />
383150<code>'F'</code>: Full height<br />
384151<code>'T'</code>: Tracker (short bar)</td>
385-<td>up to 50</td>
386-<td><a href="https://www.neodynamic.com/barcodes/DAFT-4-state-Barcode.aspx">https://www.neodynamic.com/barcodes/DAFT-4-state-Barcode.aspx</a></td>
387-</tr>
388-<tr>
389-<td><code>bctDeutschePostIdentCode</code></td>
390-<td>Deutsche Post Identcode</td>
391-<td>Mail routing in Germany</td>
392-<td><code>'0'..'9'</code></td>
393-<td>(up to) 11 digits</td>
394-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Identcode.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/Identcode.htm</a></td>
395-</tr>
396-<tr>
397-<td><code>bctDeutschePostLeitCode</code></td>
398-<td>Deutsche Post Leitcode</td>
399-<td>Specifies destination for mail in Germany</td>
400-<td><code>'0'..'9'</code></td>
401-<td>(up to) 14 digits</td>
402-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Leitcode.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/Leitcode.htm</a></td>
403-</tr>
404-<tr>
405-<td><code>bctFIM</code></td>
406-<td>FIM (Facing Identification Mark)</td>
407-<td>Automatic facing, or orientation, of the mail piece for cancellation</td>
408-<td><code>'A'..'D', 'a'..'d'</code></td>
409-<td>1</td>
410-<td><a href="https://en.wikipedia.org/wiki/Facing_Identification_Mark">https://en.wikipedia.org/wiki/Facing_Identification_Mark</a></td>
411-</tr>
412-<tr>
413-<td><code>bctJapanPost</code></td>
414-<td>Japanese Post 4-State Customer Code</td>
415-<td>Encodes addresses on mail for faster automatic processing in Japan</td>
416-<td><tt>'0'..'9', 'A'..'Z', '-'</td>
417-<td></td>
418-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Japanese_Postal.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/Japanese_Postal.htm</a> |---|</td>
419-</tr>
420-<tr>
421-<td><code>bctKoreaPost</code></td>
422-<td>Korean Postal Authority Code</td>
423-<td>Automatic sorting of mail in Korea</td>
424-<td><code>'0'..'9'</code></td>
425-<td>up to 6 digits</td>
426-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/Korea_Post.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/Korea_Post.htm</a></td>
427-</tr>
428-<tr>
429-<td><code>bctPlanet</code></td>
430-<td>USPS PLANET (Postal Alpha Numeric Encoding Technique)</td>
431-<td>Automatic identification, sorting, and tracking of pieces of mail in the U.S.</td>
432-<td><code>'0'..'9'</code></td>
433-<td>up to 38</td>
434-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/USPS_PLANET.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/USPS_PLANET.htm</a></td>
435-</tr>
436-<tr>
437-<td><code>bctPostNet</code></td>
438-<td>USPS POSTNET (Postal Numeric Encoding Technique)</td>
439-<td>Sorting of business reply and courtesy reply mail in the U.S.</td>
440-<td><code>'0'..'9'</code></td>
441-<td>up to 38</td>
442-<td><a href="https://en.wikipedia.org/wiki/POSTNET">https://en.wikipedia.org/wiki/POSTNET</a></td>
443-</tr>
444-<tr>
445-<td><code>bctRM4SCC</code></td>
446-<td>RM4SCC (Royal Mail 4-State Customer Code)</td>
447-<td>Mail service in United Kingdom</td>
448-<td><code>'0'..'9','A'..'Z'</code></td>
449-<td>up to 120</td>
450-<td><a href="https://en.wikipedia.org/wiki/RM4SCC">https://en.wikipedia.org/wiki/RM4SCC</a></td>
451-</tr>
452-<tr>
453-<td rowspan="2"><code>TBarcodeTelepen</code><br />
152+
454153<img src="tbarcodetelepen.png" title="tbarcodetelepen.png" alt="tbarcodetelepen.png" /></td>
455-<td><code>bctTelepen</code></td>
456-<td>Telepen Alpha</td>
457-<td rowspan="2">University and other academic libraries in the UK</td>
458-<td><code>#0..#127</code></td>
459-<td>up to 30</td>
460-</tr>
461-<tr>
462-<td>| <code>bctTelepenNum</code></td>
463-<td>Telepen Numeric</td>
464-<td><code>'0'..'9', 'X'</code><br />
154+
465155'X' must be at even character position.</td>
466-<td>up to 60</td>
467-<td></td>
468-</tr>
156+
469157</tbody>
470-</table>
471158
472159#### Stacked barcodes
473160
474-<table>
475161<thead>
476-<tr>
477-<th>Component</th>
478-<th>BarcodeType</th>
479-<th>Name</th>
480-<th>Application</th>
481-<th>Allowed chars</th>
482-<th>Text length</th>
483-<th>Reference</th>
484-</tr>
162+
485163</thead>
486164<tbody>
487-<tr>
488-<td rowspan="3"><code>TBarcodePDF417</code><br />
165+
489166<img src="tbarcodepdf417.png" title="tbarcodepdf417.png" alt="tbarcodepdf417.png" /></td>
490-<td><code>bctPDF417</code></td>
491-<td>PDF417 (Portable Data File)</td>
492-<td rowspan="2">Government-issued identification cards (such as driver's licenses), airline boarding passes, postage stamps, package labels, etc.</td>
493-<td rowspan="3"><code>#0..#255</code> (ISO-8859-1)</td>
494-<td rowspan="2">up to 1850 alphanumeric, or 2710 numeric characters, or 1108 bytes</td>
495-<td><a href="https://en.wikipedia.org/wiki/PDF417">https://en.wikipedia.org/wiki/PDF417</a></td>
496-</tr>
497-<tr>
498-<td><code>bctPDF417trunc</code></td>
499-<td>PDF417 truncated<br />
167+
500168Compact PDF417</td>
501-<td><a href="https://www.neodynamic.com/Products/Help/BarcodeCF2.0/barcodes/CompactPdf417.htm">https://www.neodynamic.com/Products/Help/BarcodeCF2.0/barcodes/CompactPdf417.htm</a></td>
502-</tr>
503-<tr>
504-<td><code>bctMicroPDF417</code></td>
505-<td>MicroPDF417</td>
506-<td>Designed to encode a moderate amount of data in a very small space</td>
507-<td>up to 250 alphanumeric or 366 numeric characters</td>
508-<td><a href="https://barcodeguide.seagullscientific.com/Content/Symbologies/MicroPDF417.htm">https://barcodeguide.seagullscientific.com/Content/Symbologies/MicroPDF417.htm</a></td>
509-</tr>
169+
510170</tbody>
511-</table>
512171
513172#### 2D codes
514173
515-<table>
516174<thead>
517-<tr>
518-<th>Component</th>
519-<th>Name</th>
520-<th>Application</th>
521-<th>Allowed chars</th>
522-<th>Text length</th>
523-<th>Reference</th>
524-</tr>
175+
525176</thead>
526177<tbody>
527-<tr>
528-<td><code>TBarcodeAztec</code><br />
178+
529179<img src="tbarcodeaztec.png" title="tbarcodeaztec.png" alt="tbarcodeaztec.png" /></td>
530-<td>Aztec Code</td>
531-<td>Transport ticketing (Railroad, Airline). Governmental.</td>
532-<td><code>#0..#255</code> interpreted as ISO-8859-1</td>
533-<td>up to 3823 numeric or 3067 alphabetic characters or 1914 bytes of data</td>
534-<td><a href="http://en.wikipedia.org/wiki/Aztec_Code"><span>http://en.wikipedia.org/wiki/Aztec_Code</span></a></td>
535-</tr>
536-<tr>
537-<td><code>TBarcodeAztecRune</code><br />
180+
538181<img src="tbarcodeaztecrune.png" title="tbarcodeaztecrune.png" alt="tbarcodeaztecrune.png" /></td>
539-<td>Aztec Rune</td>
540-<td>special</td>
541-<td><code>'0'..'9'</code></td>
542-<td>up to 3 (8-bit value <code>0..255</code>)</td>
543-<td><a href="http://en.wikipedia.org/wiki/Aztec_Code#Encoding"><span>http://en.wikipedia.org/wiki/Aztec_Code#Encoding</span></a></td>
544-</tr>
545-<tr>
546-<td><code>TBarcodeDatamatrix</code><br />
182+
547183<img src="tbarcodedatamatrix.png" title="tbarcodedatamatrix.png" alt="tbarcodedatamatrix.png" /></td>
548-<td>Data Matrix</td>
549-<td>Direct part marking</td>
550-<td>UTF-8</td>
551-<td>up to 2335 alphanumeric characters, 3116 numbers, or 1556 bytes of binary data.</td>
552-<td><a href="https://en.wikipedia.org/wiki/Data_Matrix"><span>https://en.wikipedia.org/wiki/Data_Matrix</span></a></td>
553-</tr>
554-<tr>
555-<td><code>TBarcodeQR</code><br />
184+
556185<img src="tbarcodeqr.png" title="tbarcodeqr.png" alt="tbarcodeqr.png" /></td>
557-<td>QR Code</td>
558-<td>Advertisement, web links, and many more</td>
559-<td>UTF-8</td>
560-<td>up to 7089 numeric digits, 4296 alphanumeric characters or 2953 bytes of data</td>
561-<td><a href="https://en.wikipedia.org/wiki/QR_code"><span>https://en.wikipedia.org/wiki/QR_code</span></a></td>
562-</tr>
563-<tr>
564-<td><code>TBarcodeMicroQR</code><br />
186+
565187<img src="tbarcodemicroqr.png" title="tbarcodemicroqr.png" alt="tbarcodemicroqr.png" /></td>
566-<td>Micro QR Code</td>
567-<td>Like QR Code, preferred when less space is available</td>
568-<td>UTF-8</td>
569-<td>up to 35</td>
570-<td><a href="http://en.wikipedia.org/wiki/Qr_code#Micro_QR_code"><span>http://en.wikipedia.org/wiki/Qr_code#Micro_QR_code</span></a></td>
571-</tr>
572-<tr>
573-<td><code>TBarcodeMaxicode</code><br />
188+
574189<img src="tbarcodemaxicode.png" title="tbarcodemaxicode.png" alt="tbarcodemaxicode.png" /></td>
575-<td>Maxicode</td>
576-<td>Tracking and managing the shipment of packages</td>
577-<td><code>#0..#255</code> interpreted as ISO-8859-1</td>
578-<td>about 90 characters (plus "primary message" needed in property <code>Primary</code> for mode 2 and 3)</td>
579-<td><a href="https://en.wikipedia.org/wiki/MaxiCode"><span>https://en.wikipedia.org/wiki/MaxiCode</span></a></td>
580-</tr>
190+
581191</tbody>
582-</table>
583192
584193#### Special properties of some components
585194
586195- `TBarcodePlessey`
587196 - `CheckChar: TPlesseyCheckChar` - determines the checksum digit(s) added to the MSI/Plessey symbol (used only when `BarcodeType = bctMSIPlessey`):
588197 - `pcOneMod10`: adds one check digit calculated by a *mod 10* algorithm
589198 - `pcTwoMod10`: adds two check digits, both calculated by a *mod 10* algorithm
590199 - `pcOneMod11`: adds one check digit calculated by a *mod 11* algorithm
591200 - `pcOneMod10Mod11`: add two check digits, the first one calculated by a *mod 10*, the second one calculated by a *mod 11* algorithm.
592201- `TBarcodeQR`
593202 - `ECCLevel: TBarcodeQR_ECCLevel` - determines the level of error correction (used also by `TBarcodeMicroQR`):
594203 - `eBarcodeQR_ECCLevel_Auto`: selects one of the other options depending on data length
595204 - `eBarcodeQR_ECCLevel_L`: Error correction capacity: approx 20% of symbol, recovery capacity: approx 7%
596205 - `eBarcodeQR_ECCLevel_M`: Error correction capacity: approx 37% of symbol, recovery capacity: approx 15%
597206 - `eBarcodeQR_ECCLevel_Q`: Error correction capacity: approx 55% of symbol, recovery capacity: approx 25%
598207 - `eBarcodeQR_ECCLevel_H`: Error correction capacity: approx 65% of symbol, recovery capacity: approx 30%
599208- `TBarcodeMaxicode`
600209 - `Mode: TBarcodeMaxicodeMode` - message mode
601210 - `mcmAuto`: tries to determine the mode from the type of the data
602211 - `mcmMode2`: In addition to the `Text` ("secondary message") also a 15-digit "primary message" must be provided in the property `Primary`. It consists of 9 numerical digits for the US-domestic post-code (property `PostCode: String`), 3 numeric digits for the country code (ISO 3166, property `CountryCode: Integer`) and 3 numeric digits for the service code (property `ServiceCode: Integer`).
603212 - `mcmMode3`: In addition to the `Text` ("secondary message") also a 15-digit "primary message" must be provided in the property `Primary`. It consists of 6 alphanumeric digits for the international post-code (property `PostCode: String`), 3 numeric digits for the country code (ISO 3166, property `CountryCode: Integer`) and 3 numeric digits for the service code (property `ServiceCode: Integer`).
604213 - `mcmMode4`: No `Primary` needed.
605214 - `mcmMode5`: No `Primary` needed.
606215 - `mcmMode6`: No `Primary` needed.
607216 - `Primary: String` - see `TBarcodeMaxicode.Mode`
608217 - `PostCode: String` - see `TBarcodeMaxicode.Mode`
609218 - `CountryCode: String` - see `TBarcodeMaxicode.Mode`
610219 - `ServiceCode: String` - see `TBarcodeMaxicode.Mode`
611220
612221### Demo application
613222
614223A 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.
615224
616225## Final notes
617226
618227If you need the generation of another barcode and it is present in Zint, please ask for it in the [Lazarus forum](http://forum.lazarus.freepascal.org/) or mailing lists.
619228
620229---
621230*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](/wiki-contact).*
622231Category: Components
623232Category: Lazarus-CCR

Back to history