{"@attributes":{"version":"2.0"},"channel":{"title":"Documentation \u2013 Barcode Generation Parameters for Barcode Types","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/barcode-type-specifics\/","description":"Recent content in Barcode Generation Parameters for Barcode Types on Documentation","generator":"Hugo -- gohugo.io","item":[{"title":"Nodejsjava: Supported Barcode Types","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/supported-barcode-types\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/supported-barcode-types\/","description":"\n        \n        \n        <p>This article introduces general information about barcode types and describes their key properties along with providing sample barcode labels and code snippets to generate barcodes of different types.<\/p>\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p>A barcode is a graphical code composed of parallel lines and spaces of different widths or various figures combined in a visual pattern to encode data. After being generated and printed out, barcode labels get placed on scannable surfaces. Barcodes have been introduced as machine-readable tags to enable fast automatical information fetching from graphic data. A single barcode may correspond to approximately 25 characters for 1D types or 2,000 for 2D ones. The greater the number of characters to be encoded in a single barcode, the larger the generated barcode.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h3 id=\"supported-barcode-types\"><strong>Supported Barcode Types<\/strong><\/h3>\n<p>All types supported in <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> are listed below.<\/p>\n<table> \n<tr> <th><\/th><th><\/th> \n<th><p align=\"center\"><b>Supported Barcode Types<\/b><\/p><\/th> \n<\/tr> \n<tr> <th rowspan=\"2\">1D<\/th> \n<th>Numerical Only<\/th> \n<td>Code 11, Code 32, Codabar, DataBar Omnidirectional, DataBar Stacked Omnidirectional, DataBar Limited, DataBar Truncated, DataBar Stacked, EAN 13, EAN 14, EAN 8,\nIATA 2-of-5, Italian Post 25, Interleaved 2-of-5, ISBN, ISMN, ISSN, ITF 6, ITF 14, Matrix 2-of-5, MSI, OPC, Patch Code, Pharmacode, PZN, SSCC 14, SSCC 18, \nStandard 2-of-5, EAN 5, EAN 2, UPC-A, UPC-E, UpcaGs1DatabarCoupon\n<\/td> \n<\/tr> \n<tr> <th>Alpha-Numeric<\/th> \n<td>Code 128, Code 39, Code 93, Code 16K, CodablockF, DataBar Expanded, DataBar Expanded Stacked, GS1 CodablockF, GS1 Code 128, VIN<\/td> \n <\/tr> \n<tr> <th colspan =\"2\" >2D<\/th> \n<td>QR Code, Micro QR Code, PDF417, Compact PDF417, Macro PDF417, Micro PDF417, Aztec Code, Data Matrix, DotCode, GS1 Data Matrix, GS1 QR Code, MaxiCode<\/td> \n <\/tr> \n <tr> <th colspan =\"2\">Postal<\/th> \n<td>Australia Post, AustralianPostParcel, Deutsche Post Identcode, Deutsche Post Leticode, Planet, Postnet, RM4SCC, SingaporePost, Swiss Post Parcel, USPS OneCode<\/td> \n <\/tr> \n<\/tr> \n<\/table>\n<h2 id=\"setting-barcode-type\"><strong>Setting Barcode Type<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports nearly all widely used barcode types. In general, to generate a barcode image, it is necessary to create an instance of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeGenerator\"><em>BarcodeGenerator<\/em><\/a> with two main parameters to be initialized: data contents to be encoded using the <em>setCodeText<\/em> method and the barcode type in the <em>setBarcodeType<\/em> method. The <em>setBarcodeType<\/em> method is used to define the type of generated barcodes. Developers can assign any options to the <em>setBarcodeType<\/em> property from the list of predefined barcode types supported by class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeGenerator\"><em>BarcodeGenerator<\/em><\/a>. However, not all types enable barcode generation with input text in a required format due to the limitations of a barcode type itself.<\/p>\n<p>Below, two barcode types, <em>Code 39<\/em> and <em>QR Code<\/em>, are considered as examples to demonstrate how to generate barcodes.<\/p>\n<p><strong>Code 39<\/strong> <br>\n<em>Code 39<\/em> is a barcode type with variable length. Its specification is limited to 43 characters, including uppercase letters (A-Z), numerical digits, and some special characters (-, ., $, \/, +, %, and space). Each character is decoded by nine elements: five bars and four spaces. This type has low data density and does not allow ensuring recognition accuracy as it does not require setting an obligatory checksum by default.<\/p>\n<p align=\"center\"><image src=\"code39extended.png\"><\/p>\n<p><strong>QR Code<\/strong><br>\n<em>QR Code<\/em> is a 2D type that is used to encode long strings of alphanumeric data, typically text or URL. A <em>QR Code<\/em> label is composed of an array of black and white squares that can be recognized by smartphones and other readers. The <em>QR Code<\/em> type provides high data encoding density. Moreover, it supports the <strong>Reed-Solomon<\/strong> error correction that allows not only to restore corrupted data but also to ensure correct information decoding.<\/p>\n<p align=\"center\"><image src=\"qrcode.png\"><\/p>\n<h2 id=\"data-encoding-formats\"><strong>Data Encoding Formats<\/strong><\/h2>\n<p><a name=\"dataencoding\"><\/a><\/p>\n<p>Different types have different underlying data encoding approaches and capabilities. Accordingly, barcode label size and the amount of data to be encoded are predefined for each type. Some barcode types allow encoding only digits or a limited set of characters and digits, while others can accept any byte sequence without limitations.<br>\nFurther in the article, several barcode types (<em>EAN 13<\/em>, <em>Code 11<\/em>, <em>GS1 Code 128<\/em>, and <em>PDF417<\/em>) with different data densities are presented as examples.<\/p>\n<p><strong>EAN 13<\/strong><br>\n<em>EAN 13<\/em> barcodes can encode only numerical digits. Specifically, the <em>EAN 13<\/em> data encoding format requires encoding precisely 12 digits with the 13th one used as a control sum calculated according to the specified algorithm.<\/p>\n<p align=\"center\"><image src=\"ean13.png\"><\/p>\n<p><strong>PDF417<\/strong><br>\nThe <em>PDF417<\/em> barcode is a 2D high-density type that is capable of encoding any sequence of bytes, including text, numbers, files, and actual data bytes. It supports the Reed-Solomon error correction and thus provides high recognition accuracy.<\/p>\n<p align=\"center\"><image src=\"pdf417.png\"><\/p>\n<p><strong>GS1 Code 128<\/strong><br>\n<em>GS1 Code 128<\/em> can encode any of ASCII alphanumeric characters similarly to the basic <em>Code 128<\/em> type. However, in <em>GS1 Code 128<\/em>, the data encoding format is defined strictly according to the GS1 standards.<\/p>\n<p align=\"center\"><image src=\"gs1code128.png\"><\/p>\n<p><strong>Code 11<\/strong><br>\n<em>Code 11<\/em> allows encoding a string of any length (theoretically, unlimited), including numerical digits and the dash sign (-).<\/p>\n<p align=\"center\"><image src=\"code11.png\"><\/p>  \n<h2 id=\"barcode-shapes\"><strong>Barcode Shapes<\/strong><\/h2>\n<p><a name=\"shape\"><\/a>\nIn general, the surfaces to place printed barcodes can have various shapes. At the same time, barcodes can be of rectangular or square forms only. Accordingly, if there is a large space to put a rectangular barcode, the generation of a square-shaped barcode is unacceptable from the viewpoint of space usage.<br>\nFurther, two barcode types, <em>Micro QR Code<\/em> and <em>Compact PDF417<\/em>, are considered as examples of barcodes with different shapes.<\/p>\n<p><strong>Micro QR Code<\/strong><br>\n<em>Micro QR Code<\/em> provides large data density; however, it has a square shape and thus needs square space to be placed. A major feature of <em>MicroQR<\/em> is that it has only one position detection pattern instead of three ones for regular <em>QR Code<\/em> and requires a more compact placement area.<\/p>\n<p align=\"center\"><image src=\"microqr.png\"><\/p>\n<p><strong>Compact PDF417<\/strong> <br>\n<em>Compact PDF417<\/em> can be used when space limitations are the main concern and barcode damage is unlikely. It has less data density compared with other 2D barcodes; however, owing to its property to have a length 64 times larger than height, it is more suitable for narrow rectangular areas with size limitations.<\/p>\n<p align=\"center\"><image src=\"compactpdf417.png\"><\/p>\n<h2 id=\"data-density\"><strong>Data Density<\/strong><\/h2>\n<p><a name=\"datadensity\"><\/a>\nData density is one of the most important properties of barcode types. It defines how much information can be encoded in a single barcode. It is low for 1D barcodes and considerably high for 2D matrix barcode types. The difference in data density for 2D and 1D types can exceed 10 times.\nThe barcode types discussed below, <em>Code93<\/em> and <em>Data Matrix<\/em>, are provided as examples of barcode types with different density values.<\/p>\n<p><strong>Code 93<\/strong><br>\n<em>Code 93<\/em> is a more secure and compact version of <em>Code 39<\/em> that can encode both alphabet characters and numerical digits. <em>Code 93<\/em> has quite low data density; therefore, with respect to other types, it requires generating larger barcodes to encode the same amounts of information.<\/p>\n<p align=\"center\"><image src=\"code93extended.png\"><\/p>\n<p><strong>Data Matrix<\/strong><br>\n<em>Data Matrix<\/em> is a 2D code that allows encoding large amounts of data in a compact space. A single <em>Data Matrix<\/em> can contain up to 2,335 alphanumeric or 3,116 numerical characters. This is 10 times greater than the standard data density of 1D barcodes.<\/p>\n<p align=\"center\"><image src=\"datamatrix.png\"><\/p>  \n<h2 id=\"barcode-reading-accuracy\"><strong>Barcode Reading Accuracy<\/strong><\/h2>\n<p><a name=\"precision\"><\/a>\nIn some cases, the data fetched after barcode recognition may be incorrect. Generally, 1D barcodes do not include a checksum or contain only simple controls; accordingly, this may result in reading erroneous data from barcodes. In turn, the majority of 2D barcodes rely on the Reed-Solomon error correction, which allows ensuring correct barcode recognition and partially recovering the data from damaged barcodes.<br>\nThe types outlined below, <em>Interleaved 2-of-5<\/em> and <em>Aztec Code<\/em>, are considered as examples of barcode types with different recognition accuracy.<\/p>\n<p><strong>Aztec Code<\/strong><br>\n<em>Aztec Code<\/em> is a highly efficient 2D type that uses square modules with a unique finder pattern in the middle of a barcode, which allows barcode scanners to identify cell locations required for barcode reading. This barcode type not only enables encoding any sequence of bytes but also ensures correct data recognition.<\/p>\n<p align=\"center\"><image src=\"aztecfull.png\"><\/p>\n<p><strong>Interleaved 2-of-5<\/strong><br>\n<em>Interleaved 2-of-5<\/em> can encode sequences of digits of any length as long as such a sequence contains an even number of digits. By default, it does not require setting a checksum and thus can be read with errors.<\/p>\n<p align=\"center\"><image src=\"interleaved2of5.png\"><\/p>\n<h2 id=\"postal-barcodes\"><strong>Postal Barcodes<\/strong><\/h2>\n<p>Postal symbologies correspond to the specific industrial barcode types that are used only for the needs of postal services. They have much lower data density compared with 2D barcodes and are capable of encoding limited sets of characters, mainly, only numerical ones. Unlike traditional barcodes, postal types usually vary the height of bars to encode information. <em><strong>Aspose.Barcode for Node.js via Java<\/strong><\/em> supports the most widely used postal types in addition to 1D and 2D ones.<\/p>\n<p><strong>RM4SCC<\/strong><br>\n<em>RM4SCC<\/em> is capable of encoding only digits and English alphabet capital characters. Its parameters are similar to those of 1D barcodes. In this barcode type, each character corresponds to four bars so that two of them are extended upwards and the other two - downwards. The combination of such bars with variable height provides combinations to encode 36 possible characters: 10 numerical and 26 alphabetical ones.<\/p>\n<p align=\"center\"><image src=\"rm4scc.png\"><\/p>\n<p><strong>Postnet<\/strong><br>\n<em>Postnet<\/em> allows encoding only digits corresponding to ZIP or ZIP+4 codes in half- and full-height bars; its parameters are similar to those of 1D barcodes. In this barcode type, each digit is encoded by a set of five bars, two of which are of full height.\nTwo type considered below, <em>Postnet<\/em> and <em>RM4SCC<\/em>, are provided as examples of postal barcodes.<\/p>\n<p align=\"center\"><image src=\"postnet.png\"><\/p>\n\n      "},{"title":"Nodejsjava: Set Parameters for 1D Barcode Types","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/set-barcode-parameters\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/set-barcode-parameters\/","description":"\n        \n        \n        <h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> enables customizing various parameters that are specific for 1D barcode generation. Particularly for 1D barcode standards, developers can adjust the following display properties: the height of bars, the mode of bar filling, the wide-to-narrow ratio, and the automatic correction of invalid barcode text.<br>\nThis article describes how to manage these properties using specified classes and properties of the library.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"set-bar-height\"><strong>Set Bar Height<\/strong><\/h2>\n<p>It is possible to modify the height of bars for 1D single-row barcodes by setting <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#AutoSizeMode\"><em>AutoSizeMode<\/em><\/a> to <em>AutoSizeMode.NONE<\/em>. In this case, regardless of the value specified through the <em>setXDimension<\/em> method, the bar height can be regulated using the <em>setBarHeight<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>. This method does not apply to multiple-row barcodes and 2D barcodes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Bar Height<\/th>\n<th style=\"text-align:center\">Is Set to 40 Pixels<\/th>\n<th style=\"text-align:center\">Is Set to 80 Pixels<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"barheight40code128.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"barheight80code128.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/This sample shows how to create and save a barcode image\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"><\/span> <span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">CODE_128<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">setAutoSizeMode<\/span><span class=\"o\">(<\/span><span class=\"n\">AutoSizeMode<\/span><span class=\"o\">.<\/span><span class=\"na\">NEAREST<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getBarCodeWidth<\/span><span class=\"o\">().<\/span><span class=\"na\">setMillimeters<\/span><span class=\"o\">(<\/span><span class=\"n\">50<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getBarCodeHeight<\/span><span class=\"o\">().<\/span><span class=\"na\">setInches<\/span><span class=\"o\">(<\/span><span class=\"n\">1<\/span><span class=\"o\">.<\/span><span class=\"na\">3f<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">save<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;test.png&#34;<\/span><span class=\"o\">,<\/span> <span class=\"n\">BarcodeImageFormat<\/span><span class=\"o\">.<\/span><span class=\"na\">PNG<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"set-wide-to-narrow-ratio\"><strong>Set Wide-to-Narrow Ratio<\/strong><\/h2>\n<p>Two-width 1D barcodes are based on the binary code principle, meaning that information is encoded using bars and spaces with two options of width: wide and narrow. Two-width barcode symbologies include the following: <em>Codabar<\/em>, <em>Code 11<\/em>, <em>Code 32<\/em>, <em>Code 39<\/em>, <em>DataLogic 2-of-5<\/em>, <em>IATA 2-of-5<\/em>, <em>Interleaved 2-of-5<\/em>, <em>ITF 6<\/em>, <em>ITF 14<\/em>, <em>Matrix 2-of-5<\/em>, <em>MSI<\/em>, <em>OPC<\/em>, <em>PZN<\/em>, <em>Standard 2-of-5<\/em>, and <em>VIN<\/em>.<\/p>\n<p>In <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em>, the <strong>wide-to-narrow ratio<\/strong> defines the relation between the width of wide and narrow elements. It can be set using the <em>setWideNarrowRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>. The larger if the value of the wide-to-narrow ratio, the larger is the width of the generated barcode. However, the readability also improves with an increase in this parameter. By default, <em>WideNarrowRatio<\/em> is set to 3.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Wide-to-Narrow Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 2<\/th>\n<th style=\"text-align:center\">Is Set to 5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"widenarrow2code39.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"widenarrow5code39.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"handle-exception-on-incorrect-barcode-text\"><strong>Handle Exception on Incorrect Barcode Text<\/strong><\/h2>\n<p>When a barcode has not been created correctly due to invalid barcode text, by default, the library can generate additional dummy data to bring the barcode in line with the standard or delete conflicting characters. In this case, barcode generation is considered successfully completed.<\/p>\n<p>Developers can change this behaviour by using the <em>setThrowExceptionWhenCodeTextIncorrect<\/em> method of <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>. When this method is called, an exception is thrown if the barcode text has been found incorrect or incomplete.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Barcode Text Correctness<\/th>\n<th style=\"text-align:center\">Correct with Valid Barcode Text<\/th>\n<th style=\"text-align:center\">Adjusted with Invalid Barcode Text<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"itf6correct.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"itf6filled.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"bar-filling-modes\"><strong>Bar Filling Modes<\/strong><\/h2>\n<p>For 1D barcodes, <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> provides a specific mode to generate barcodes with empty bars instead of filled ones. Such a modification can be done using the <em>setFilledBars<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>. This property is set to <em>True<\/em> by default and is valid only for 1D barcodes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Bar Filling<\/th>\n<th style=\"text-align:center\">Filled<\/th>\n<th style=\"text-align:center\">Empty<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"barsfilledcode128.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"barsemptycode128.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate QR Code and Micro QR Code","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-qr-code\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-qr-code\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/qr\">Generate QR Code Online<\/a>: You can test the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for QR Codes and get results.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>QR Code<\/em> corresponds to a group of 2D square types that benefits from high data density and allows encoding streams of bytes and textual data composed of using Unicode symbols. <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports Extended Channel Interpretation (ECI) to encode Unicode data and provides various encoding modes; UTF8 is one of the most widely used encoding mode.<\/p>\n<p>Reserving the minimum possible amount of data for error correction, the <em>QR Code<\/em> standard can be used to encode at most 7,089 numerical digits or 4,296 alphanumeric characters or 2,953 bytes. The other standard, <em>Micro QR Code<\/em>, allows encoding up to 35 numerical digits or 21 alphanumeric characters or 15 bytes. <em>Micro QR Code<\/em> serves to create considerably small <em>QR Code<\/em> images. However, it does not enable Extended Channel Interpretation (ECI) and does not allow encoding Unicode characters. <em>Micro Qr Code<\/em> barcodes corresponding to the <em>M1<\/em> version can encode at most five numerical digits; the <em>M2<\/em> version allows encoding up to ten numericals or six alphanumeric characters. This encoding capacity is usually suitable to work with industrial markers.<\/p>\n<p>Main advantages of <em>QR Code<\/em> can be outlined as follows:<\/p>\n<ul>\n<li>Large data density<\/li>\n<li>Scanning and reading even for severely damaged barcode images<\/li>\n<li>Encoding streams of bytes<\/li>\n<li>High scanning and decoding speed<\/li>\n<li>Encoding Unicode characters using ECI (not applicable to <em>Micro QR Code<\/em>)<\/li>\n<li>Error correction mechanism; the maximal error correction level H allows restoring up to 30% of encoded information<\/li>\n<\/ul>\n<p>Large damage of target patterns in <em>QR Code<\/em> images can results in deteriorating barcode scanning and reading efficiency.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out Aspose <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"generation-modes\"><strong>Generation Modes<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> allows generating <em>QR Code<\/em> or <em>Micro QR Code<\/em> images corresponding to different versions. This can done through two methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrParameters\"><em>QrParameters<\/em><\/a>, i.e. <em>setQrEncodeType<\/em> using values from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QREncodeType\"><em>QREncodeType<\/em><\/a> global property and <em>setQrVersion<\/em> with values from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QRVersion\"><em>QRVersion<\/em><\/a> global property. By default, the <em>AUTO<\/em> setting is enabled.<\/p>\n<p>The first way to set the required version of <em>QR Code<\/em> or <em>Micro QR Code<\/em> is to use the <em>setQrVersion<\/em> method. If data inputted for encoding does not occupy the entire capacity of the target version, padding characters are used to fill the leftover space. If barcode information exceeds the available capacity, barcode images cannot be generated, and the corresponding exception is thrown.<\/p>\n<p>The second way to determine the desired <em>QR Code<\/em> generation mode is applicable when <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QRVersion\"><em>QRVersion<\/em><\/a> remains set to <em>AUTO<\/em>. In this case, the <em>setQrEncodeType<\/em> method can be used to select the barcode type according to the input data size. The <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QREncodeType\"><em>QREncodeType<\/em><\/a> global property can take the following values:<\/p>\n<ul>\n<li><em>AUTO<\/em>: firstly, the library aims to identify the most appropriate <em>Micro QR Code<\/em> version from M1 to M4. If no suitable version is found, the library iterates over supported <em>QR Code<\/em> versions from <em>Version 01<\/em> to <em>Version 40<\/em>. If the data to be encoded does not fit to the data capacity of <em>Version 40<\/em>, an exception is thrown.<\/li>\n<li><em>FORCE_QR<\/em>: the most appropriate <em>QR Code<\/em> version is automatically selected among options from <em>Version 01<\/em> to <em>Version 40<\/em>.<\/li>\n<li><em>FORCE_MICRO_QR<\/em>: the library aims at selecting the most applicable <em>Micro QR Code<\/em> version from M1 to M4. If the input data exceeds the data capacity of the M4 verion, an exception is thrown.<\/li>\n<\/ul>\n<h3 id=\"manual-version-selection\"><strong>Manual Version Selection<\/strong><\/h3>\n<p>It is possible to manually select the desired <em>QR Code<\/em> version for barcode generation. In this case, it is required to call the <em>setQRVersion<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrParameters\"><em>QrParameters<\/em><\/a> passing a value from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QRVersion\"><em>QRVersion<\/em><\/a> global property, i.e. from <em>VERSION_01<\/em> to <em>VERSION_40<\/em> for <em>QR Code<\/em> or from <em>VERSION_M1<\/em> to <em>VERSION_M4<\/em> for <em>Micro QR Code<\/em>. The following barcode images are intended to explain how to create <em>QR Code<\/em> barcodes using manual settings to define the requested version.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Version<\/th>\n<th style=\"text-align:center\">QR Code VERSION_05<\/th>\n<th style=\"text-align:center\">Micro QR VERSION_M4<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrversion05.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrversionm4.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"automatic-version-setting\"><strong>Automatic Version Setting<\/strong><\/h3>\n<p>The following sample barcodes images are given to explain how to create different types of <em>QR Code<\/em> using varios automatic version setting modes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Generation Mode<\/th>\n<th style=\"text-align:center\"><em>AUTO<\/em><\/th>\n<th style=\"text-align:center\"><em>FORCE_QR<\/em><\/th>\n<th style=\"text-align:center\"><em>FORCE_MICRO_QR<\/em><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrencodetypeauto.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrencodetypeforceqr.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrencodetypeforcemicroqr.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"encoding-modes\"><strong>Encoding Modes<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> enables the variety of widely used data encoding specifications, including Unicode. Developers can select the desired encoding mode through the <em>setQrEncodeMode<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrParameters\"><em>QrParameters<\/em><\/a> passing a value from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#QREncodeMode\"><em>QrEncodeMode<\/em><\/a> global property that includes the following options:<\/p>\n<ul>\n<li><em>AUTO<\/em>: information inputted through the <em>setCodeText<\/em> method gets encoded using the value set through the <em>setCodeTextEncoding<\/em> method (UTF8 is applied by default).<\/li>\n<li><em>BYTES<\/em>: is intended to encode byte streams and allows encoding digits from 0 to 255. In cases when a byte stream includes digits larger than 255, the library applies the <em>UTF16LE<\/em>.<\/li>\n<li><em>UTF_8_BOM<\/em> and <em>UTF_16_BEBOM<\/em>: allow encoding barcode data in UTF8 and UTF16BE encodings. The first character is encoded as a byte order mark (BOM) character to denote the enabled encoding. However, the <em>ECI_ENCODING<\/em> mode is recommended for use because it is more suitable to set the encodings suitable for the <em>QR Code<\/em> standard.<\/li>\n<li><em>ECI_ENCODING<\/em>: applies encodings from the list defined in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#ECIEncodings\"><em>ECIEncodings<\/em><\/a> global property.<\/li>\n<li><em>EXTENDED_CODETEXT<\/em>: in addition to main information, barcode data must include special control words that are required to establish improved controls over the data encoding process; in this mode, textual parts with various encodings can be stored in one <em>QR Code<\/em> barcode.<\/li>\n<\/ul>\n<h3 id=\"auto-mode\"><strong><em>AUTO<\/em> Mode<\/strong><\/h3>\n<p>To encode input data when the <em>AUTO<\/em> encoding mode is enabled, the library applies the encoding defined through the <em>setCodeTextEncoding<\/em> method. If the required encoding is not specified explicitly, UTF8 is applied.<\/p>\n<p align=\"center\"><img src=\"qrencodemodeauto.png\"><\/p>\n<h3 id=\"bytes-mode\"><strong><em>BYTES<\/em> Mode<\/strong><\/h3>\n<p>When the <em>BYTES<\/em> encoding mode is used, input information presented in a form of a plain byte stream is trasnformed to an array of symbols and then to a string. Digits from 0 to 255 can be encoded. If a byte stream contains digits larger than 255, this symbol gets encoded as two bytes in the UTF16LE encoding (the lower byte is put first).<\/p>\n<p align=\"center\"><img src=\"qrencodemodebytes.png\"><\/p>\n<h3 id=\"eci_encoding-mode\"><strong><em>ECI_ENCODING<\/em> Mode<\/strong><\/h3>\n<p>The <em>ECI_ENCODING<\/em> encoding mode suggests applying one of the encodings listed in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#ECIEncodings\"><em>ECIEncodings<\/em><\/a> global property. <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports the variety of widely used encodings. In this mode, the extended channel interpretation (ECI) identifier is added to denote the enabled encoding to transfer the information about it to decoders. It is recommended to use the UTF8 value.<\/p>\n<p align=\"center\"><img src=\"qrencodemodeeciencoding.png\"><\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/Example how to use ECI encoding\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"><\/span>    <span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">QR<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">setCodeText<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;12345TEXT&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getQR<\/span><span class=\"o\">().<\/span><span class=\"na\">setQrEncodeMode<\/span><span class=\"o\">(<\/span><span class=\"n\">QREncodeMode<\/span><span class=\"o\">.<\/span><span class=\"na\">ECI_ENCODING<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getQR<\/span><span class=\"o\">().<\/span><span class=\"na\">setQrEncodeType<\/span><span class=\"o\">(<\/span><span class=\"n\">QREncodeType<\/span><span class=\"o\">.<\/span><span class=\"na\">FORCE_QR<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getQR<\/span><span class=\"o\">().<\/span><span class=\"na\">setQrECIEncoding<\/span><span class=\"o\">(<\/span><span class=\"n\">ECIEncodings<\/span><span class=\"o\">.<\/span><span class=\"na\">UTF8<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">save<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;test.png&#34;<\/span><span class=\"o\">,<\/span> <span class=\"n\">BarcodeImageFormat<\/span><span class=\"o\">.<\/span><span class=\"na\">PNG<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h3 id=\"utf_8_bom-and-utf_16_bebom-modes\"><strong><em>UTF_8_BOM<\/em> and <em>UTF_16_BEBOM<\/em> Modes<\/strong><\/h3>\n<p>The library provides two special encoding modes called <em>UTF_8_BOM<\/em> and <em>UTF_16_BEBOM<\/em> that serve to encode information according to <em>UTF8<\/em> and <em>UTF16BE<\/em> specifications. A byte order mark (BOM) symbol is added as the first digit.<\/p>\n<p align=\"center\"><img src=\"qrencodemodeutfbom.png\"><\/p>\n<h3 id=\"extended_codetext-mode\"><strong><em>EXTENDED_CODETEXT<\/em> Mode<\/strong><\/h3>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports the <em>EXTENDED_CODETEXT<\/em> mode that allows customizing settings for the <em>QR Code<\/em> generation process manually. This mode enables activating the multi-ECI mode and adding FNC characters (special symbols to differentiate between fields in variable-length identifiers) to work with extended textual information. The library provides a special class called <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrExtCodetextBuilder\"><em>QrExtCodetextBuilder<\/em><\/a> that facilitate using with this encoding mode. When the multi-ECI mode is enabled, barcode information gets processed for all predefined encodings automatically. In all other cases, the encoding defined through the <em>setCodeTextEncoding<\/em> method is applied.<\/p>\n<p align=\"center\"><img src=\"qrencodemodeextendedcodetext.png\"><\/p>\n<h2 id=\"error-correction-level\"><strong>Error Correction Level<\/strong><\/h2>\n<p>The <em>QR Code<\/em> group of barcode standards provides four types of Reed-Solomon error correction (EC). The error correction mechanism prescribes storing redundant data to facilitate automatic error detectiion and correctiion in the case of barcode image distortions or damages. Basically, to recover 1% of corrupted data, 2% redundancy is required.<\/p>\n<p>Following error correction levels are supported for <em>QR Code<\/em>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Error Correction Level<\/th>\n<th style=\"text-align:center\">Data Recovery Capacity<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\">Level L<\/td>\n<td style=\"text-align:center\">7%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">Level M<\/td>\n<td style=\"text-align:center\">15%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">Level Q<\/td>\n<td style=\"text-align:center\">25%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">Level H<\/td>\n<td style=\"text-align:center\">30%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For all <em>QR Code<\/em> subtypes with the exception of <em>Micro QR<\/em>, developers can use any error correction level. For <em>Micro QR<\/em>, different subtypes are compatible with specific EC levels only, i.e. <em>M1<\/em> enables EC level L; <em>M2<\/em> - levels L and M; <em>M3<\/em> and <em>M4<\/em> - levels L, M, and Q.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Error Correction Level<\/th>\n<th style=\"text-align:center\">Level L<\/th>\n<th style=\"text-align:center\">Level M<\/th>\n<th style=\"text-align:center\">Level Q<\/th>\n<th style=\"text-align:center\">Level H<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrerrorlevell.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrerrorlevelm.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrerrorlevelq.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrerrorlevelh.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"aspect-ratio-settings\"><strong>Aspect Ratio Settings<\/strong><\/h2>\n<p><em>Aspect Ratio<\/em> is the ratio between the height and the width of a barcode. To adjust barcode proportions using the X and Y coordinates, it is required to use the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrParameters\"><em>QrParameters<\/em><\/a>. This property is defined as a relative coefficient to the value of <em>XDimension<\/em> parameter. Generally, the value of <em>AspectRatio<\/em> should be set to 1. When it is necessary to adjust the proportions of generated <em>QR Code<\/em> barcodes, the <em>setAspectRatio<\/em> method can be used. Sample barcode labels shown below have been generated using different aspect ratio settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 1<\/th>\n<th style=\"text-align:center\">Is Set to 2<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"qraspectratio1.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qraspectratio2.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"structured-append-mechanism\"><strong>Structured Append Mechanism<\/strong><\/h2>\n<p><em>QR Code<\/em> types (except <em>Micro QR<\/em>) support the possibility to generate composite barcodes using the structured append mechanism. In this mode, the input data can be divided among different <em>QR Code<\/em> barcodes and then composed into a single image. <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> does not enable distributing input barcode data across several <em>QR Code<\/em> barcodes; however, it allows creating a composite <em>QR Code<\/em> label manually. This can be done through the <em>setStructuredAppend<\/em> method passing an object of lass <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/QrStructuredAppendParameters\"><em>QrStructuredAppendParameters<\/em><\/a> class. This class provides the following methods:<\/p>\n<ul>\n<li><em>setTotalCount<\/em> - the number of barcodes in a composite <em>QR Code<\/em> image (can take values from 2 to 16)<\/li>\n<li><em>setSequenceIndicator<\/em> - the sequence number of the current barcode (starting from 0)<\/li>\n<li><em>setParityByte<\/em> - a byte that serves as a checksum identifier. In the general case, it is calculated as <em>XOR<\/em> of all bytes in which UTF16BE symbols are encoded using two bytes<\/li>\n<\/ul>\n<p>Sample barcode images provided below have been created using the structured append mechanism.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Structured Append Type<\/th>\n<th style=\"text-align:center\">First Type<\/th>\n<th style=\"text-align:center\">Second Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrstructuredappendfirst.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"qrstructuredappendsecond.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate PDF417 Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-pdf417-barcodes\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-pdf417-barcodes\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/pdf417\">Generate PDF417 Barcodes Online<\/a>: You can test the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for PDF417 barcodes and get the results online.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>PDF417<\/em> is a family of 2D variable-length stacked barcode standards that enables laser scanning for documents of high quality (with the exception of <em>Compact PDF417<\/em>, which supports only photo scanning). The <em>PDF417<\/em> type provides smaller data density compared with matrix barcode types. However, it is several times larger than the data density of conventional 1D stacked barcode standards. <em>PDF417<\/em> barcodes can be used to encode streams of bytes or Unicode characters and contain recovery data required for Reed-Solomon error correction.<\/p>\n<p>One of the main specificities of <em>PDF417<\/em> types is that they support the special format of encoding metadata. This allows dividing a single document into several parts marked with barcode labels indicating file name, creation date, checksum control, and some other additional information. Thereafter, these parts can be transmitted one by one and reassembled together according to barcode markers. Adding metadata to barcodes occupies extra barcode capacity.<\/p>\n<p>The <em>PDF417<\/em> layout configuration is composed of multiple rows and columns. Basic <em>PDF417<\/em> can be used to encode at most 1,850 alphanumeric characters or 2,710 numerical digits or 1,108 bytes with the maximal configuration including 90 rows and 30 columns. In turn, the <em>Micro PDF417<\/em> type can encode up to 266 alphanumeric characters or 366 numerical digits or 150 bytes with the maximal configuration of 44 rows and 4 columns.<\/p>\n<table>\n<thead>\n<tr>\n<th>PDF417 Standard<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"#pdf417\"><strong>Basic PDF417<\/strong><\/a><\/td>\n<td>Can be used to work with documents of any quality and supports laser scanning<\/td>\n<\/tr>\n<tr>\n<td><a href=\"#micropdf417\"><strong>Micro PDF417<\/strong><\/a><\/td>\n<td>Allows minimizing the barcode area and can be used as an add-on for GS1 composite symbologies or applied to high-quality documents<\/td>\n<\/tr>\n<tr>\n<td><a href=\"#macropdf417\"><strong>Macro PDF417<\/strong><\/a><\/td>\n<td>Provides increased encoding capacity and supports metainformation<\/td>\n<\/tr>\n<tr>\n<td><a href=\"#compactpdf417\"><strong>Compact PDF417<\/strong><\/a><\/td>\n<td>Supports optional metainformation and can be useful in cases of limited printing space. It suggests omitting the right-side block of metadata and removing the stop pattern is removed. Laser scanning is not supported; only photo scanning is available. It is applicable to high-quality documents only<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"basic-pdf417-and-macro-pdf417-types\"><strong>Basic PDF417 and Macro PDF417 Types<\/strong><\/h2>\n<p><em>Basic PDF417<\/em> and <em>Macro PDF417<\/em> support the following configuration: from 1 to 30 columns to encode information; 2 columns to store metainformation (i.e. row indicator, layout information); start and stop patterns. It is possible to add from 3 to 90 rows. The key difference between <em>Basic PDF417<\/em> and <em>Macro PDF417<\/em> is that the latter supports metadata.<\/p>\n<p align=\"center\"><img src=\"pdf417basic.png\"><\/p>\n<p><a name=\"pdf417\"><\/a><\/p>\n<h2 id=\"micro-pdf417-type\"><strong>Micro PDF417 Type<\/strong><\/h2>\n<p>The layout of <em>Micro PDF417<\/em> supports adding from 4 to 44 rows and from 1 to 4 columns. Layout options are strictly predefined in terms of maximum and minimum numbers of rows and columns, as well as error correction codewords. Moreover, barcodes include two columns with metadata. Commonly, <em>Micro PDF417<\/em> is suggested for use in high-quality documents to ensure correct recognition. However, this type supports laser scanning.<\/p>\n<p align=\"center\"><img src=\"micropdf417basic.png\"><\/p>\n<p><a name=\"micropdf417\"><\/a><\/p>\n<h2 id=\"compact-pdf417-symbology\"><strong>Compact PDF417 Symbology<\/strong><\/h2>\n<p><em>Compact PDF417<\/em> has a specification like <em>Basic PDF417<\/em> and <em>Macro PDF417<\/em>. The difference is that in <em>Compact PDF417<\/em> barcodes, the right-side metainformation column and the corresponding stop pattern are eliminated to decrease barcode size. This is the only barcode type in the <em>PDF417<\/em> family that does not support laser scanning. It should be also noted that reading low-quality barcode images may have issues due to the lack of metainformation redundancy. To enable the <em>Compact PDF417<\/em> mode, developers can use the <em>setPdf417Truncate<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>.<\/p>\n<p align=\"center\"><img src=\"compactpdf417basic.png\"><\/p>\n<p><a name=\"compactpdf417\"><\/a><\/p>\n<h2 id=\"pdf417-encoding-modes\"><strong>PDF417 Encoding Modes<\/strong><\/h2>\n<p>To enable the required encoding mode for <em>PDF417<\/em> generation, it is necessary to call the <em>setPdf417CompactionMode<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a> that is intended to manage data compaction regimes. Two other methods, i.e. <em>setPdf417ECIEncoding<\/em> and <em>setCodeTextEncoding<\/em>, can be used to enable encoding modes suitable for Unicode symbols. In this article, it is described how to work with different encoding modes.<\/p>\n<h3 id=\"eci-encoding-mode\"><strong>ECI Encoding Mode<\/strong><\/h3>\n<p>The <em>setPdf417ECIEncoding<\/em> method can be used to encode Unicode symbols to streams of bytes. Moreover, it allows determining an ECI identifier for the present encoding that can be detected and interpreted by decoders. When this method is called passing any value from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#ECIEncodings\"><em>ECIEncodings<\/em><\/a> class besides <em>ECIEncodings.NONE<\/em>, information is processed using the determined ECI encoding. At present, <em><strong>Aspose.BarCode<\/strong><\/em> supports all widely used charset encodings included in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#ECIEncodings\"><em>ECIEncodings<\/em><\/a> class.<\/p>\n<p align=\"center\"><img src=\"pdf417eciencoding.png\"><\/p>\n<h3 id=\"compaction-mode\"><strong>Compaction Mode<\/strong><\/h3>\n<p>Developers can enable the desired data compaction mode through the <em>setPdf417CompactionMode<\/em> method passing the value from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#Pdf417CompactionMode\"><em>Pdf417CompactionMode<\/em><\/a> global property.<\/p>\n<table>\n<thead>\n<tr>\n<th>Compaction Mode<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AUTO<\/strong><\/td>\n<td>Automatically selects the data compaction mode with the highest data density. If barcode data contains a digit greater than 255, data compaction is performed with the specified encoding<\/td>\n<\/tr>\n<tr>\n<td><strong>BINARY<\/strong><\/td>\n<td>Encodes binary streams of bytes comprising digits from 0 to 255. If barcode data has a digit greater than 255, data compaction is conducted using the specified encoding<\/td>\n<\/tr>\n<tr>\n<td><strong>NUMERIC<\/strong><\/td>\n<td>Legacy mode for numerical digits. Using the <em>AUTO<\/em> mode is recommended<\/td>\n<\/tr>\n<tr>\n<td><strong>TEXT<\/strong><\/td>\n<td>Legacy mode for alphanumeric characters. Using the <em>Auto<\/em> mode is recommended<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Following barcodes have been created applying various compaction modes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Compaction Mode<\/th>\n<th style=\"text-align:center\">AUTO<\/th>\n<th style=\"text-align:center\">BINARY<\/th>\n<th style=\"text-align:center\">TEXT<\/th>\n<th style=\"text-align:center\">NUMERIC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417compactionauto.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417compactionbinary.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417compactiontext.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417compactionnumeric.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"unicode-encoding-mode\"><strong>Unicode Encoding Mode<\/strong><\/h3>\n<p>Unicode characters can be encoded using the <em>setCodeTextEncoding<\/em> method.<\/p>\n<p align=\"center\"><img src=\"pdf417codetextencoding.png\"><\/p>\n<h3 id=\"encoding-streams-of-bytes-in-binary-mode\"><strong>Encoding Streams of Bytes in Binary Mode<\/strong><\/h3>\n<p>Developers can encode and transmit an array of bytes through the <em>BINARY<\/em> mode that can be enabled through the <em>setPdf417CompactionMode<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>. To show the text line under a barcode, the <em>setTwoDDisplayText<\/em> method must be called.<\/p>\n<p align=\"center\"><img src=\"pdf417bytesencoding.png\"><\/p>\n<h2 id=\"layout-configuration-settings\"><strong>Layout Configuration Settings<\/strong><\/h2>\n<p>Developers can define the required layout configuration for <em>PDF417<\/em> generation using dedicated methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>, i.e. <em>setRows<\/em> and <em>setColumns<\/em>. All <em>PDF417<\/em> standards besides <em>Micro PDF417<\/em> may have the following configuration settings: from 1 to 30 columns and from 3 to 90 rows. The number of rows and columns can be defined separately. The layout of <em>Micro PDF417<\/em> allows adding from 1 to 4 columns.<\/p>\n<p>Following <em>PDF417<\/em> barcodes have different layout configurations.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Layout Configuration<\/th>\n<th style=\"text-align:center\">2 Columns<\/th>\n<th style=\"text-align:center\">6 Rows<\/th>\n<th style=\"text-align:center\">9 Rows and 6 Columns<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417columns2.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417row6.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417row9columns4.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"managing-error-correction-level\"><strong>Managing Error Correction Level<\/strong><\/h2>\n<p>The <em>PDF417<\/em> barcode family supports Reed-Solomon error correction to provide data recovery and integrity check. <em>Micro PDF417<\/em> enables determining the size of redundant recovery data automatically. Other <em>PDF417<\/em> standards allow customizing the error correction level through the <em>setPdf417ErrorLevel<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>. Each additional pair of error correction codewords serves to recover one unknown error or two known missing digits. A higher error correction level requires storing more codewords and enables more efficient data recovery for damaged barcodes. The maximal level of error correction, i.e. <em>Level8<\/em>, means that 265 errors can be corrected. However, data encoding capacity will decrease by 614 bytes. Available error correction levels are represented in the following table.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Error Correction Level**<\/th>\n<th style=\"text-align:center\">Number of Codewords<\/th>\n<th style=\"text-align:center\">Error Correction Level<\/th>\n<th style=\"text-align:center\">Number of Codewords<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Level 0<\/strong><\/td>\n<td style=\"text-align:center\">2 codewords<\/td>\n<td style=\"text-align:center\"><strong>Level 5<\/strong><\/td>\n<td style=\"text-align:center\">64 codewords<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>Level 1<\/strong><\/td>\n<td style=\"text-align:center\">4 codewords<\/td>\n<td style=\"text-align:center\"><strong>Level 6<\/strong><\/td>\n<td style=\"text-align:center\">128 codewords<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>Level 2<\/strong><\/td>\n<td style=\"text-align:center\">8 codewords<\/td>\n<td style=\"text-align:center\"><strong>Level 7<\/strong><\/td>\n<td style=\"text-align:center\">256 codewords<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>Level 3<\/strong><\/td>\n<td style=\"text-align:center\">16 codewords<\/td>\n<td style=\"text-align:center\"><strong>Level 8<\/strong><\/td>\n<td style=\"text-align:center\">512 codewords<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>Level 4<\/strong><\/td>\n<td style=\"text-align:center\">32 codewords<\/td>\n<td style=\"text-align:center\"><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Following <em>PDF417<\/em> barcodes have different error correction levels.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Error Correction Level<\/th>\n<th style=\"text-align:center\">Is Set to 2<\/th>\n<th style=\"text-align:center\">Is Set to 5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417errorlevel2.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417errorlevel5.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"aspect-ratio-settings\"><strong>Aspect Ratio Settings<\/strong><\/h2>\n<p><em>Aspect Ratio<\/em> is one of the main parameters used to manage barcode proportions along X and Y coordinates. <em>Aspect Ratio<\/em> can be determined as the ratio between barcode height and width or as the relative coefficient to the <em>XDimension<\/em> value. Its value can be modified through the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>. To generate <em>PDF417<\/em> barcodes, it is recommended to select the value of <em>AspectRatio<\/em> between 3 and 5.<\/p>\n<p>Following <em>PDF417<\/em> barcodes have been generated with different aspect ratio values.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 2<\/th>\n<th style=\"text-align:center\">Is Set to 5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417aspectratio2.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"pdf417aspectratio5.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"working-withpdf417-metadata\"><strong>Working withPDF417 Metadata<\/strong><\/h2>\n<p><em>Micro PDF417<\/em> and <em>Macro PDF417<\/em> allow adding special metainformation about barcode data. Such metadata can be encoded together with main barcode information sharing the same blocks of data. It is possible to classify barcode metadata into permanent data and optional data as clarified further. All methods mentioned below correspond to class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>.<\/p>\n<p><a name=\"macropdf417\"><\/a><\/p>\n<h3 id=\"permanent-metadata\"><strong>Permanent Metadata<\/strong><\/h3>\n<p>Permanent metadata can be used to encode different special parameters through the methods listed below.<\/p>\n<table>\n<thead>\n<tr>\n<th>Permanent Metadata Method<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>setPdf417MacroFileID<\/em><\/td>\n<td>Manually adjusted unique identifier used for a series of barcodes or a PDF417 file<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroSegmentID<\/em><\/td>\n<td>Identifier of the current barcode segment starting from 0. It is often used together with the <em>setPdf417MacroSegmentsCount<\/em> method that allows setting the number of barcodes in a series<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p align=\"center\"><img src=\"macropdf417permanent.png\"><\/p>\n<h3 id=\"optional-metadata\"><strong>Optional Metadata<\/strong><\/h3>\n<p>Optional metadata are used to store information about various data properties that can be encoded through special methods described below.<\/p>\n<table>\n<thead>\n<tr>\n<th>Optional Metadata Method<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>setPdf417MacroSegmentsCount<\/em><\/td>\n<td>Amount of barcodes in a series<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroFileName<\/em><\/td>\n<td>File name<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroChecksum<\/em><\/td>\n<td>Barcode checksum ocomputed based on the CCITT-16 polynomial<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroFileSize<\/em><\/td>\n<td>Overall size of bytes in a barcode series<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroTimeStamp<\/em><\/td>\n<td>Time spent to generate\/send a file<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroAddressee<\/em><\/td>\n<td>File sender address<\/td>\n<\/tr>\n<tr>\n<td><em>setPdf417MacroSender<\/em><\/td>\n<td>File sender name<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p align=\"center\"><img src=\"macropdf417optional.png\"><\/p>\n<h3 id=\"unicode-metadata\"><strong>Unicode Metadata<\/strong><\/h3>\n<p>In <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em>, it is possible to re-encode optional metadata using the Unicode encoding through the <em>setPdf417MacroECIEncoding<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a>. This method is intended to perform the conversion of metadata and send it along with the related encoding identifier.<\/p>\n<p align=\"center\"><img src=\"macropdf417eciencoding.png\"><\/p>\n<h2 id=\"setting-special-parameters\"><strong>Setting Special Parameters<\/strong><\/h2>\n<p>The barcode library allows encoding specific control parameters for <em>PDF417<\/em> barcodes, i.e. hardware reader initialization and emulation for the <em>Code 128<\/em> type.<\/p>\n<h3 id=\"hardware-reader-initialization\"><strong>Hardware Reader Initialization<\/strong><\/h3>\n<p>The <em>setReaderInitialization<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a> that allows encoding the special flag used to indicate that barcode data will serve for hardware reader initialization.<\/p>\n<p align=\"center\"><img src=\"pdf417readerinitialization.png\"><\/p>\n<h3 id=\"code-128-emulation\"><strong><em>Code 128<\/em> Emulation<\/strong><\/h3>\n<p>In some cases, it may be necessary to make hardware readers emulate information encoded in <em>Micro PDF417<\/em> barcodes in the format of <em>Code 128<\/em> barcode data. This can be done by calling the <em>setCode128Emulation<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Pdf417Parameters\"><em>Pdf417Parameters<\/em><\/a> and passing the required value from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#Code128Emulation\"><em>Code128Emulation<\/em><\/a> global property. This method is applicable to <em>Micro PDF417<\/em> barcodes only.<\/p>\n<p align=\"center\"><img src=\"pdf417code128emulation.png\"><\/p>\n\n      "},{"title":"Nodejsjava: Generate Data Matrix Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-datamatrix\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-datamatrix\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/datamatrix\">Generate Data Matrix Barcodes Online<\/a>: You can test the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for Data Matrix barcodes and get results online.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>Data Matrix<\/em> is a 2D matrix symbology used to generate barcodes of rectangular and square shapes. It is a widespread industrial standard that can be used to encode characters and streams of bytes. Maximum configuration of <em>Data Matrix<\/em> contains up to 144 rows and columns and allows encoding at most 3,116 numerical digits or 2,335 ASCII symbols or 1,555 bytes. The <em>Data Matrix<\/em> barcode data includes special information for integrity verification and error correction. The error correction mechanism allows reading barcodes with severe damages. <em>Data Matrix<\/em> includes two standards described in the table below.<\/p>\n<table>\n<thead>\n<tr>\n<th>Data Matrix Standard<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>ECC 000-140<\/em><\/td>\n<td>Several obsolete standards that enable square barcode configuration only, use outdated encoding algorithms and support convolutional error correction. It is recommended not to apply these standards to business-as-usual goals as they currently serve only to execute industrial tasks that are compatible with outdated instructions<\/td>\n<\/tr>\n<tr>\n<td><em>ECC 200<\/em><\/td>\n<td>Modern standard that enables both square and rectangular barcode configurations, utilizes up-to-date encoding methods and supports Reed-Solomon error correction. It is applicable to any up-to-date application<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"data-matrix-ecc-standards\"><strong>Data Matrix ECC Standards<\/strong><\/h2>\n<p>To enable the required <em>Data Matrix<\/em> standard, developers can use the <em>setDataMatrixEcc<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataMatrixParameters\"><em>DataMatrixParameters<\/em><\/a>. This method allows setting one of the supported standards: <em>ECC 000-140<\/em> (outdated standards) or <em>ECC 200<\/em> (recent universal standard) using the values available in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#DataMatrixEccType\"><em>DataMatrixEccType<\/em><\/a> global property. The value of <em>DataMatrixEccType.ECC_200<\/em> is set by default.<\/p>\n<h3 id=\"ecc-200\"><em><strong>ECC 200<\/strong><\/em><\/h3>\n<p>The <em>ECC 200<\/em> standard can be set using the <em>setDataMatrixEcc<\/em> method and passing values <em>ECC_AUTO<\/em> or <em>ECC_200<\/em>. <em>ECC 200<\/em> is compatible with all encoding modes specified in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#DataMatrixEncodeMode\"><em>DataMatrixEncodeMode<\/em><\/a> global property. Moreover, it allows encoding Unicode characters through the <em>setCodeTextEncoding<\/em> method. The capacity of additional recovery information required for error correction is precisely limited for barcodes according to their size.<\/p>\n<p align=\"center\"><img src=\"datamatrixecc200basic.png\"><\/p>  \n<h3 id=\"ecc-000-140\"><em><strong>ECC 000-140<\/strong><\/em><\/h3>\n<p><em>ECC 000-140<\/em> standards can be applied only to a few encoding modes included in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#DataMatrixEncodeMode\"><em>DataMatrixEncodeMode<\/em><\/a> global property, i.e. <em>AUTO<\/em>, <em>FULL<\/em>, and <em>ASCII<\/em>. All other encoding modes are processed as <em>FULL<\/em> by default. The <em>setCodeTextEncoding<\/em> method  is not applicable to these standards and therefore, encoding Unicode characters is not supported. Barcode layout confirgurations of <em>ECC 000-140<\/em> differ significantly from <em>ECC 200<\/em>. At the same time, different standards corresponding to <em>ECC 000-140<\/em> are quite similar between each other and only have different data recovery capacity, as explained below.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">ECC Standard<\/th>\n<th style=\"text-align:center\">Data Recovery Capacity<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>ECC_000<\/strong><\/td>\n<td style=\"text-align:center\">Only error detection<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>ECC_050<\/strong><\/td>\n<td style=\"text-align:center\">2.8%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>ECC_080<\/strong><\/td>\n<td style=\"text-align:center\">5.5%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>ECC_100<\/strong><\/td>\n<td style=\"text-align:center\">12.6%<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\"><strong>ECC_140<\/strong><\/td>\n<td style=\"text-align:center\">25%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p align=\"center\"><img src=\"datamatrixecc000140basic.png\"><\/p>\n<h2 id=\"encoding-modes\"><strong>Encoding Modes<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports various encoding modes that are defined in the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#DataMatrixEncodeMode\"><em>DataMatrixEncodeMode<\/em><\/a> global property. It enables nine encoding modes, as described below. The <em>AUTO<\/em> encoding mode is used by default.<\/p>\n<table>\n<thead>\n<tr>\n<th>Encoding Mode<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>AUTO<\/em><\/td>\n<td>Similar to <em>ASCII<\/em><\/td>\n<\/tr>\n<tr>\n<td><em>ASCII<\/em><\/td>\n<td>Encodes both ASCII characters and streams of bytes; characters from 128 to 255 are encoded with two bytes. The <em>FULL<\/em> mode is recommended to encode streams of bytes<\/td>\n<\/tr>\n<tr>\n<td><em>FULL<\/em><\/td>\n<td>Encodes any symbol in 8 bits. This mode is recommended to encode byte streams<\/td>\n<\/tr>\n<tr>\n<td><em>CUSTOM<\/em><\/td>\n<td>Uses the encoding determined in <em>BarCodeBuilder.CodeTextEncoding<\/em>; thereafter, the generated stream of bytes is further processed through the <em>FULL<\/em> mode<\/td>\n<\/tr>\n<tr>\n<td><em>C40<\/em>, <em>TEXT<\/em>, <em>EDIFACT<\/em>, and <em>ANSIX12<\/em><\/td>\n<td>Encode predefined sets of symbols through special industrial encodings, i.e. C40, Text, EDIFACT, and ANSI X12<\/td>\n<\/tr>\n<tr>\n<td><em>EXTENDED_CODETEXT<\/em><\/td>\n<td>Gives flexible control over encodings and allows setting the required encoding for a part of the input message manually<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For all encoding modes except <em>CUSTOM<\/em>, the encoding determined in <em>BarCodeBuilder.CodeTextEncoding<\/em> is used to process input information that includes a Unicode symbol (any character with the value over 255). The <em>CUSTOM<\/em> mode is enabled in the <em>ECC 200<\/em> standard only. Further in the article, it is explained how to manage different encoding modes.<\/p>\n<h3 id=\"auto-and-ascii-encoding-modes\"><strong><em>AUTO<\/em> and <em>ASCII<\/em> Encoding Modes<\/strong><\/h3>\n<p><em>AUTO<\/em> and <em>ASCII<\/em> encoding modes allow encoding ASCII symbols and byte streams. However, encoding characters from 128 to 255 takes two bytes for each character. In cases when input text includes Unicode symbols, information needs to be re-encoded with the use of the encoding determined in <em>BarCodeBuilder.CodeTextEncoding<\/em>.<\/p>\n<p align=\"center\"><img src=\"datamatrixencodemodeauto.png\"><\/p> \n<h3 id=\"encoding-streams-of-bytes-in-full-mode\"><strong>Encoding Streams of Bytes in <em>FULL<\/em> Mode<\/strong><\/h3>\n<p>The <em>FULL<\/em> mode is used to encode streams of bytes. In this mode, each byte is encoded with 8 bits. If input barcode data contains Unicode characters, information gets re-encoded with the encoding set in <em>BarCodeBuilder.CodeTextEncoding<\/em>. It is possible to represent text lines by calling the <em>setTwoDDisplayText<\/em> method.<\/p>\n<p align=\"center\"><img src=\"datamatrixencodemodefullbytes.png\"><\/p> \n<h3 id=\"encoding-unicode-text-in-custom-mode\"><strong>Encoding Unicode Text in <em>CUSTOM<\/em> Mode<\/strong><\/h3>\n<p>In all cases, the <em>CUSTOM<\/em> encoding mode implies first re-encoding barcode information into a stream of bytes. Thereafter, the generated stream gets processed in the <em>FULL<\/em> mode; here, each byte is encoded using 8 bits.<\/p>\n<p align=\"center\"><img src=\"datamatrixencodemodecustom.png\"><\/p> \n<h3 id=\"extended-encoding-controls-in-extended_codetext-mode\"><strong>Extended Encoding Controls in <em>EXTENDED_CODETEXT<\/em> Mode<\/strong><\/h3>\n<p>The <em>EXTENDED_CODETEXT<\/em> mode allows encoding input data applying various encodings to different parts of barcode text if requested by specific industrial standards. It is possible to combine different supported encodings, i.e. <em>AUTO<\/em>, <em>ASCII<\/em>, <em>C40<\/em>, <em>TEXT<\/em>, <em>ANSIX12<\/em>, and <em>EDIFACT<\/em>.<\/p>\n<p>It is necessary to formulate a barcode text message using the following form: <mark>&quot;\\Encoding_mode_name:text\\Encoding_mode_name:text&quot;<\/mark>. It is necessary to double all backslashes in text. To display the text message under a barcode, it is required to call the <em>setTwoDDisplayText<\/em> method.<\/p>\n<p align=\"center\"><img src=\"datamatrixextendedcodetext.png\"><\/p> \n<h3 id=\"special-industrial-encoding-modes-c40-text-edifact-and-ansix12\"><strong>Special Industrial Encoding Modes: <em>C40<\/em>, <em>TEXT<\/em>, <em>EDIFACT<\/em>, and <em>ANSIX12<\/em><\/strong><\/h3>\n<p>Various special encoding modes, such as <em>TEXT<\/em>, <em>C40<\/em>, <em>EDIFACT<\/em>, and <em>ANSIX12<\/em>, can be used to encode barcode information in forms compatible with specific industrial requirements. These modes are applicable to industrial tasks only.<\/p>\n<p align=\"center\"><img src=\"datamatrixencodemodec40.png\"><\/p> \n<h2 id=\"layout-settings\"><strong>Layout Settings<\/strong><\/h2>\n<p>The layout for <em>Data Matrix<\/em> barcode generation can be determined through <em>setRows<\/em> and <em>setColumns<\/em> methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataMatrixParameters\"><em>DataMatrixParameters<\/em><\/a>. If these methods have not been called explicitly, the barcode library identifies a layout that is optimal for the size of input data. Barcode layout configurations are different in <em>ECC 000-140<\/em> and <em>ECC 200<\/em> standards. Only <em>ECC 200<\/em> allows modifying the number of rows and columns. In <em>ECC 000-140<\/em> standards, the suitable barcode layout configuration is determined automatically. The <em>ECC 200<\/em> standard prescribes setting even numbers of rows and columns. In other words, it supports the following layout configurations: 8 x 18; 16 x 48; 10 x 10; 144 x 144.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Layout Settings<\/th>\n<th style=\"text-align:center\">22 Rows and 22 Columns<\/th>\n<th style=\"text-align:center\">12 Rows and 36 Columns<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"datamatrixrows22columns22ecc200.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"datamatrixrows12columns36ecc200.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"working-with-macro-characters\"><strong>Working with Macro Characters<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports the use of macro characters in <em>Data Matrix<\/em> barcodes. The <em>Data Matrix<\/em> standard allows encoding industry-specific headers and trailers in a single character. This feature leads to the reduction of the number of symbols for data encoding owing to the use of dedicated structured formats. Macro characters can be useful to implement particular industrial needs. It is necessary to set a macro character in the first digit position.<\/p>\n<h2 id=\"aspect-ratio-settings\"><strong>Aspect Ratio Settings<\/strong><\/h2>\n<p><em>Aspect Ratio<\/em> is one of the most important parameters defined as the ratio between barcode height and width. The barcode library provides the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataMatrixParameters\"><em>DataMatrixParameters<\/em><\/a> that allows managing barcode proportions based on the X and Y coordinates. <em>Aspect Ratio<\/em> is determined as a relative coefficient to <em>XDimension<\/em>. Usually, it is recommended to set the value of <em>Aspect Ratio<\/em> equal to 1.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 1<\/th>\n<th style=\"text-align:center\">Is Set to 0.5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"datamatrixaspectratio1.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"datamatrixaspectratio0.5.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate Aztec Code Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-aztec-code\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-aztec-code\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/aztec\">Generate Aztec Code Barcodes Online<\/a>: You can check the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for Aztec Code barcodes and view results.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>Aztec Code<\/em> is a 2D barcode type that allows encoding alphanumeric characters and streams of bytes. <em>Aztec Code<\/em> barcodes are composed of square modules that create individual patterns in the center of a barcode image. These so-called bulls-eye signs facilitate barcode detection and scanning. This type supports Reed-Solomon error correction to assure data integrity and completeness. It benefits from high reading accuracy and data density.<\/p>\n<p>The <em>Aztec Code<\/em> barcode type supports three subtypes:<\/p>\n<ul>\n<li><em>Full-Range Aztec Code<\/em> - allows encoding up to 3,832 numerical or 3,067 alphanumeric symbols or 1,914 bytes<\/li>\n<li><em>Compact Aztec Code<\/em> - allows encoding up to 110 numerical or 89 alphanumeric symbols or 53 bytes<\/li>\n<li><em>Aztec Rune<\/em> - allows encoding values from 0 to 255 and is mainly used to label objects in Augmented Reality systems<\/li>\n<\/ul>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"generation-modes\"><strong>Generation Modes<\/strong><\/h2>\n<p>The preferred generation mode can be set using the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#AztecSymbolMode\"><em>AztecSymbolMode<\/em><\/a> global property of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/AztecParameters\"><em>AztecParameters<\/em><\/a>. The following modes are supported:<\/p>\n<ul>\n<li><em>Auto<\/em>: identifies the most suitable <em>Aztec Code<\/em> type with the data capacity that is sufficient to encode data passed through the <em>setCodeText<\/em> method<\/li>\n<li><em>Compact<\/em>: allows generating <em>Compact Aztec Code<\/em> barcodes with at most 4 layers and 27x27 modules<\/li>\n<li><em>FullRange<\/em>: creates <em>Full-Range Aztec Code<\/em> barcodes with at most 32 layers and 151x151 modules<\/li>\n<li><em>Rune<\/em>: generates <em>Aztec Rune<\/em> barcodes with at most 11x11 modules and can encode only numerical symbols from 0 to 255<\/li>\n<\/ul>\n<p>Following <em>Aztec Code<\/em> barcode images have been generated through various generation modes.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Generation Mode<\/th>\n<th style=\"text-align:center\"><em>Auto<\/em><\/th>\n<th style=\"text-align:center\"><em>Compact<\/em><\/th>\n<th style=\"text-align:center\"><em>Full-Range<\/em><\/th>\n<th style=\"text-align:center\"><em>Rune<\/em><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecsymbolmodeauto.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecsymbolmodecompact.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecsymbolmodefullrange.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecsymbolmoderune.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AZTEC<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">setCodeText<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;125&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAztec<\/span><span class=\"o\">().<\/span><span class=\"na\">setAztecSymbolMode<\/span><span class=\"o\">(<\/span><span class=\"n\">AztecSymbolMode<\/span><span class=\"o\">.<\/span><span class=\"na\">AUTO<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">save<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;test.png&#34;<\/span><span class=\"o\">,<\/span> <span class=\"n\">BarCodeImageFormat<\/span><span class=\"o\">.<\/span><span class=\"na\">PNG<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AZTEC<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">setCodeText<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;125&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAztec<\/span><span class=\"o\">().<\/span><span class=\"na\">setAztecSymbolMode<\/span><span class=\"o\">(<\/span><span class=\"n\">AztecSymbolMode<\/span><span class=\"o\">.<\/span><span class=\"na\">COMPACT<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">save<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;test.png&#34;<\/span><span class=\"o\">,<\/span> <span class=\"n\">BarCodeImageFormat<\/span><span class=\"o\">.<\/span><span class=\"na\">PNG<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"err\">```<\/span> <span class=\"n\">java<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AZTEC<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">setCodeText<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;125&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAztec<\/span><span class=\"o\">().<\/span><span class=\"na\">setAztecSymbolMode<\/span><span class=\"o\">(<\/span><span class=\"n\">AztecSymbolMode<\/span><span class=\"o\">.<\/span><span class=\"na\">FULL_RANGE<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">save<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;test.png&#34;<\/span><span class=\"o\">,<\/span> <span class=\"n\">BarCodeImageFormat<\/span><span class=\"o\">.<\/span><span class=\"na\">PNG<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><pre tabindex=\"0\"><code>\n``` java\nlet generator = new BarcodeGenerator(EncodeTypes.AZTEC);\n generator.setCodeText(&#34;125&#34;);\n generator.getParameters().getBarcode().getAztec().setAztecSymbolMode(AztecSymbolMode.RUNE);\n generator.save(&#34;test.png&#34;, BarCodeImageFormat.PNG);\n<\/code><\/pre><h2 id=\"encoding-byte-streams\"><strong>Encoding Byte Streams<\/strong><\/h2>\n<p>In <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em>, streams of bytes can be encoded as <em>Aztec Code<\/em> barcodes. To display the text label, it is required to call the <em>setTwoDDisplayText<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/CodetextParameters\"><em>CodetextParameters<\/em><\/a>.<\/p>\n<p align=\"center\"><img src=\"aztecbytesencoding.png\"><\/p>\n<h2 id=\"encoding-unicode-symbols\"><strong>Encoding Unicode Symbols<\/strong><\/h2>\n<p>Unicode symbols can be encoded using the <em>setCodeTextEncoding<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/AztecParameters\"><em>AztecParameters<\/em><\/a>. This method is applicable to all <em>Aztec Code<\/em> barcodes except <em>Rune<\/em>.<\/p>\n<p align=\"center\"><img src=\"azteccodetextencoding.png\"><\/p>\n<h2 id=\"error-correction-settings\"><strong>Error Correction Settings<\/strong><\/h2>\n<p><em>Aztec Code<\/em> barcodes include recovery information that can take from 5 to 95% of the entire encoded data stream. It is recommended to set this parameter to 23%. To select the required error correction level, it is necessary to use the <em>setAztecErrorLevel<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/AztecParameters\"><em>AztecParameters<\/em><\/a>.<\/p>\n<p>Following barcode images have been created using various error correction levels.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Error Correction Level<\/th>\n<th style=\"text-align:center\">Is Set to 5<\/th>\n<th style=\"text-align:center\">Is Set to 50<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecerrorlevel5.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecerrorlevel50.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"aspect-ratio-settings\"><strong>Aspect Ratio Settings<\/strong><\/h2>\n<p><em>Aspect Ratio<\/em> is defined as the ratio between the barcode width and height. To modify proportions using the X and Y coordinates, the barcode library provides the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/AztecParameters\"><em>AztecParameters<\/em><\/a>. <em>AspectRatio<\/em> is determined as a relative coefficient to the value of <em>XDimension<\/em>. In general, it is recommended to set <em>AspectRatio<\/em> equal to 1. If the proportions of <em>Aztec Code<\/em> barcodes to be generated need to be adjusted, the <em>setAspectRatio<\/em> method can be used to do this.<\/p>\n<p>Following barcodes have been generated with various values of the aspect ratio.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 1<\/th>\n<th style=\"text-align:center\">Is Set to 0.5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecaspectratio1.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"aztecaspectratio0.5.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate DataBar Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-databar\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-databar\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/databar\">Generate DataBar Barcodes Online<\/a>: You can check the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for DataBar barcodes and view results online.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p>The <em>DataBar<\/em> standard was developed in the 2000s in compliance with the GS1 standard. It was intended to address problems of barcode types introduced in the 70s. However, it was also important to preserve one of the key features of 1D barcodes, i.e, the laser scanning ability. The following subtypes are represented within the <em>DataBar<\/em> type:<\/p>\n<ul>\n<li><em>DataBar Omnidirectional<\/em> \/ <em>DataBar Stacked Omnidirectional<\/em><\/li>\n<li><em>DataBar Expanded<\/em> \/ <em>DataBar Expanded Stacked<\/em><\/li>\n<li><em>DataBar Truncated<\/em> \/ <em>DataBar Stacked<\/em><\/li>\n<li><em>DataBar Limited<\/em><\/li>\n<\/ul>\n<p>With the exception of except <em>DataBar Limited<\/em>, all aforementioned subtypes have two-row and multiple-row (at most 10 rows) versions. This property enables fitting the barcode layout to the limited horizontal space. <em>DataBar<\/em> standards have been introduced to work with GS1 identification codes (Application Identifiers) used to mark trade items. All <em>DataBar<\/em> subtypes excluding <em>DataBar Expanded<\/em> \/ <em>DataBar Expanded Stacked<\/em> are applicable only to the trade identifiers determined using Global Trade Item Number (GTIN) in <em>GTIN12<\/em> or <em>GTIN13<\/em> digital formats with the 14-digit data structure. In contrast, <em>DataBar Expanded<\/em> barcodes are compatible with any type of application identifiers and may contain additional data in any format as it allows encoding uppercase and lowercase English alphabet symbols, numerical digits, and 21 punctuation signs.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"barcode-height-settings\"><strong>Barcode Height Settings<\/strong><\/h2>\n<p><em>DataBar<\/em> standards can be classified in two types: continuous and stacked. <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> provides its own mode to customize the height of barcodes for for each of these types, as explained further in the article.<\/p>\n<h3 id=\"continuous-barcode-types\"><strong>Continuous Barcode Types<\/strong><\/h3>\n<p><em>DataBar Omnidirectional<\/em>, <em>DataBar Truncated<\/em>, <em>DataBar Limited<\/em>, and <em>DataBar Expanded<\/em> correspond to continuos barcode types. Here, barcode heigh can be adjusted using the <em>setBarHeight<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>.<\/p>\n<p>Following <em>DataBar Omnidirectional<\/em> barcode images have been created setting various barcode heights.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Barcode Height<\/th>\n<th style=\"text-align:center\">Is Set to 30 Pixels<\/th>\n<th style=\"text-align:center\">Is Set to 60 Pixels<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"databarbarheight30pixels.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databarbarheight60pixels.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"stacked-barcode-types\"><strong>Stacked Barcode Types<\/strong><\/h3>\n<p><em>DataBar Stacked Omnidirectional<\/em>, <em>DataBar Stacked<\/em>, and <em>DataBar Expanded Stacked<\/em> can be classified as stacked barcode types. For such barcode types, the heigh of barcodes can be customized by calling the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataBarParameters\"><em>DataBarParameters<\/em><\/a>. <em>AspectRatio<\/em> is specified as a relative coefficient to the value of <em>XDimension<\/em>.<\/p>\n<p>Following <em>DataBar Stacked Omnidirectional<\/em> barcodes have been generated setting different values of the aspect ratio.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 15<\/th>\n<th style=\"text-align:center\">Is Set to 30<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"databaraspectratio15.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databaraspectratio30.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"databar-expanded-stacked-layout-settings\"><strong>DataBar Expanded Stacked Layout Settings<\/strong><\/h2>\n<p>The <em>DataBar Expanded Stacked<\/em> subtype supports flexible barcode layout that may be adjuted by changing barcode row and column numbers. <em><strong>Aspose.BarCode<\/strong><\/em> allows adding up to 22 segments to compose at most 10 strings. The barcode layout of <em>DataBar Expanded Stacked<\/em> barcodes can be customized through <em>setRows<\/em> and <em>setColumns<\/em> methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataBarParameters\"><em>DataBarParameters<\/em><\/a>. It should be noted that first, the number of segments in a row has to be determined using the <em>setColumns<\/em> method.<\/p>\n<p>Following <em>DataBar Expanded Stacked<\/em> barcodes have varying barcode layouts.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Layout Settings<\/th>\n<th style=\"text-align:center\">4 Columns<\/th>\n<th style=\"text-align:center\">3 Rows<\/th>\n<th style=\"text-align:center\">6 Columns and 10 Rows<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"databarcols4.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databarrows3.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databarcols6rows10.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"compatibility-with-gs1-components\"><strong>Compatibility with GS1 Components<\/strong><\/h2>\n<p>Considering that <em>DataBar Expanded<\/em> \/ <em>DataBar Expanded Stacked<\/em> subtypes enable data encoding in any format, it may be important to ensure compatibilty of the encoded information with GS1 standards. This can be impemented through the <em>setAllowOnlyGS1Encoding<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataBarParameters\"><em>DataBarParameters<\/em><\/a>. This method requests checking for compatibility of the encoded data with GS Application Identifiers. An exception is thrown if an inconsistency is identified. This method can also serve to verify the correctness of GTIN values in other <em>DataBar<\/em> subtypes.<\/p>\n<p><em>DataBar Expanded<\/em> barcodes shown below have been generated suing the GS1-compatible and non-compatible data formats.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">GS1 Compatibility<\/th>\n<th style=\"text-align:center\">GS1 Compatible Encoding<\/th>\n<th style=\"text-align:center\">Alternate Encoding<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"databargs1rightencoding.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databargs1variableencoding.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"enabling-2d-component\"><strong>Enabling 2D Component<\/strong><\/h2>\n<p><em>DataBar<\/em> standards allow adding a 2D component linkage flag to enable creating a related 2D barcode that can be printed together with the corresponding <em>DataBar<\/em> barcode. Such a flag is often used in GS1-compatible composite barcode types. The barcode library provides the <em>set2DCompositeComponent<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/DataBarParameters\"><em>DataBarParameters<\/em><\/a> that allows setting this flag manually for specific industrial standards without changing the data encoded in the main barcode.<\/p>\n<p><em>DataBar Expanded<\/em> barcodes below have different settings for the 2D component flag.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">2D Component Flag<\/th>\n<th style=\"text-align:center\">Is Disabled<\/th>\n<th style=\"text-align:center\">Is Enabled<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"databar2dcomponentdisabled.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"databar2dcomponentenabled.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate Codabar Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-codabar\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-codabar\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/codabar\">Generate Codabar Barcodes Online<\/a>: You can test the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for Codabar barcodes and get results.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> supports the <em>Codabar<\/em> type that allows encoding numerical characters and a set of six punctuation signs. <em>Codabar<\/em> barcodes may include four optional alphabet symbols (generally, A, B, C, or D) serving as start and stop characters. As such, this symbology supports four sets of start digits and four sets of stop ones. In this way, using the same input data, it is possible to create 16 barcodes with service sets of start and stop symbols.<\/p>\n<p>Input text in <em>Codabar<\/em> barcodes has the following format:<\/p>\n<p align=\"center\"><mark>[Start Character \"A\/B\/C\/D\"] [Data Digits from the charset: \"0-9\" and \"\u2013$.\/:+\"] [Stop Character \"A\/B\/C\/D\"]<\/mark><\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"start-and-stop-symbols\"><strong>Start and Stop Symbols<\/strong><\/h2>\n<p>Start and stop digits can be encoded separately using any of four formats (A, B, C, or D). To specify the preferred format, it is possible to use <em>setCodabarStartSymbol<\/em> and <em>setCodabarStopSymbol<\/em> methods from class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/CodabarParameters\"><em>CodabarParameters<\/em><\/a>. The default set of start and stop digits is &ldquo;A&rdquo;.<\/p>\n<p>Following barcode images have been created using various sets of start and stop characters.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Start and Stop Characters<\/th>\n<th style=\"text-align:center\">A+A<\/th>\n<th style=\"text-align:center\">B+B<\/th>\n<th style=\"text-align:center\">C+C<\/th>\n<th style=\"text-align:center\">D+D<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarstartastopa.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarstartbstopb.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarstartcstopc.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarstartdstopd.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"checksum-settings\"><strong>Checksum Settings<\/strong><\/h2>\n<p>By default, the <em>Codabar<\/em> standard does not require obligatory checksum controls. If checksum controls are needed, <em>Codabar<\/em> provides two checksum algorithms: Mod10 and Mod16. The pseudocode given below shows how these two checksum algorithms can be used.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/Mod10\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"><\/span><span class=\"n\">foreach<\/span> <span class=\"o\">(<\/span><span class=\"n\">var<\/span> <span class=\"n\">value<\/span> <span class=\"n\">in<\/span> <span class=\"n\">encodedCodetext<\/span><span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">checkSum<\/span> <span class=\"o\">=<\/span> <span class=\"o\">(<\/span><span class=\"n\">checkSum<\/span> <span class=\"o\">+<\/span> <span class=\"n\">value<\/span><span class=\"o\">)<\/span> <span class=\"o\">%<\/span> <span class=\"n\">10<\/span><span class=\"o\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/Mod16\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"><\/span><span class=\"n\">foreach<\/span> <span class=\"o\">(<\/span><span class=\"n\">var<\/span> <span class=\"n\">value<\/span> <span class=\"n\">in<\/span> <span class=\"n\">encodedCodetext<\/span><span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">checkSum<\/span> <span class=\"o\">=<\/span> <span class=\"o\">(<\/span><span class=\"n\">checkSum<\/span> <span class=\"o\">+<\/span> <span class=\"n\">value<\/span><span class=\"o\">)<\/span> <span class=\"o\">%<\/span> <span class=\"n\">16<\/span><span class=\"o\">;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>Checksum controls for <em>Codabar<\/em> can be enabled using the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#EnableChecksum\"><em>EnableChecksum<\/em><\/a> global property. The required checksum algorithm can be allocated through the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#CodabarChecksumMode\"><em>CodabarChecksumMode<\/em><\/a> global property. By default, the <em>Mod16<\/em> checksum is applied.<\/p>\n<p><em>Codabar<\/em> barcode images below have been generated using different checksum control settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Checksum<\/th>\n<th style=\"text-align:center\">Is Set to <em>None<\/em><\/th>\n<th style=\"text-align:center\">Is Set to <em>Mod10<\/em><\/th>\n<th style=\"text-align:center\">Is Set to <em>Mod16<\/em><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarchecksumnone.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarchecksummod10.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codabarchecksummod16.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate Codablock-F Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-codablockf\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-codablockf\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/codablock?type=codablockf\">Generate Codablock-F Barcodes Online<\/a>: You can check the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for Codablock-F barcodes and view results.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>Codablock-F<\/em> is a stacked multiple-row barcode type that enables creating barcodes that include many <em>Code 128<\/em> barcodes. This symbology allows encoding at most 2,725 digits and contains from 2 to 44 rows with from 4 to 62 characters. <em>Codablock-F<\/em> benefits from two principle differences compared with the basic <em>Code 128<\/em> symbology. It provides flexible settings of barcode layout in terms of the number of rows and columns and thus allows organizing vertical and horizontal space more efficiently. Moreover, it contains two additional check digits (calculated using the modulo 86 algorithm) for a <em>Codablock-F<\/em> barcode besides obligatory checksum controls that are included in each row of <em>Code 128<\/em> barcodes. Finally, <em>Codablock-F<\/em> can be detected using laser scanners.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"height-settings\"><strong>Height Settings<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> allows developers to modify the height of each row in a stacked barcode through the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/CodablockParameters\"><em>CodablockParameters<\/em><\/a>. <em>AspectRatio<\/em> is determined as a relative coefficient to <em>XDimension<\/em>. For <em>Codablock-F<\/em> barcodes, the value of <em>AspectRatio<\/em> should be set greater than 10.<\/p>\n<p>Following barcode images have been created using various aspect ratio settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 15<\/th>\n<th style=\"text-align:center\">Is Set to 30<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"codablockfaspectratio15.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codablockfaspectratio30.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"layout-settings\"><strong>Layout Settings<\/strong><\/h2>\n<p>To adjust the layout of a <em>Codablock-F<\/em> barcode in terms of the number of columns and rows, <em>setColumns<\/em> and <em>setRows<\/em> methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/CodablockParameters\"><em>CodablockParameters<\/em><\/a> can be used. The maximum values of columns and rows can be 62 and 44, respectively.<\/p>\n<p>Barcode images provided below have been generated using different layout settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Layout Settings<\/th>\n<th style=\"text-align:center\">4 Columns<\/th>\n<th style=\"text-align:center\">4 Rows<\/th>\n<th style=\"text-align:center\">6 Rows and 4 Columns<\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"codablockfcol4.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codablockfrow4.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"codablockfrow6col4.png\"><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate Code16K Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-code16k\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-code16k\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/code16k\">Generate Code16K Barcodes Online<\/a>: You can test the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for Code16K barcodes and get results online.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p><em>Code16K<\/em> is a stacked multiple-row symbology that may include at most 16 rows. Each row in a barcode has the fixed length and can encode up to five symbols. It supports the data encoding structure that is alike the one of <em>Code128<\/em> symbology and encodes the same character set with similar data density. <em>Code16K<\/em> comprises checksum digits computed in two last characters for the whole barcode. However, no separate checksum controls are supported for a single row. A <em>Code16K<\/em> can encode at most 77 symbols or 154 numerical digits. Currently, this symbology is considered from the historical viewpoint and is rarely applied to real-life business tasks.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact <a href=\"https:\/\/helpdesk.aspose.com\/\">Aspose Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"barcode-height-settings\"><strong>Barcode Height Settings<\/strong><\/h2>\n<p>In <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em>, it is possible to modify the row height of a <em>Code16K<\/em> barcode through the <em>setAspectRatio<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Code16KParameters\"><em>Code16KParameters<\/em><\/a>. <em>AspectRatio<\/em> is determined as a relative coefficient to the value of <em>XDimension<\/em>. In the <em>Code16K<\/em> standard, the value of <em>AspectRatio<\/em> should be set larger than 8.<\/p>\n<p>Following <em>Code16K<\/em> barcodes have been created using various barcode height settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Aspect Ratio<\/th>\n<th style=\"text-align:center\">Is Set to 10<\/th>\n<th style=\"text-align:center\">Is Set to 20<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"code16kaspectratio10.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"code16kaspectratio20.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"quiet-zone-settings\"><strong>Quiet Zone Settings<\/strong><\/h2>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> allows modifying the size of quiet zones in <em>Code16K<\/em> barcodes by calling <em>setQuietZoneLeftCoef<\/em> and <em>setQuietZoneRightCoef<\/em> methods of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/Code16KParameters\"><em>Code16KParameters<\/em><\/a>. Quiet zone coefficients are determined relatively to the value of <em>XDimension<\/em>.<\/p>\n<p>Following <em>Code16K<\/em> barcodes have been generated using various quiet zone settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Quiet Zone Coefficient<\/th>\n<th style=\"text-align:center\">Is Set to 10<\/th>\n<th style=\"text-align:center\">Is Set to 20<\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"code16kquietzonel10r10.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"code16kquietzonel20r20.png\"><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "},{"title":"Nodejsjava: Generate Postal Barcodes","link":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-postal-barcodes\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/docs.aspose.com\/barcode\/nodejsjava\/generate-postal-barcodes\/","description":"\n        \n        \n        \n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<a href=\"https:\/\/products.aspose.app\/barcode\/generate\/planet\">Generate USPS Planet and<\/a> <a href=\"https:\/\/products.aspose.app\/barcode\/generate\/postnet\">USPS Postnet Barcodes online<\/a>. You can check the quality of <em><strong>Aspose.BarCode<\/strong><\/em> generation for postal barcodes and view results.\n<\/div>\n\n<h2 id=\"overview\"><strong>Overview<\/strong><\/h2>\n<p>Postal barcodes have been introduced to address some problems of 1D barcode types to facilitate postal operations. Such barcode types suggest encoding input information through alterating the height of bars and not the width of bars and spaces as in 1D standards. Postal barcode standards usually ignore horizontal parameters to mitigate the risk of false-positive barcode detection.<\/p>\n<p>Many countries use their own symbologies in postal services. Generally, such barcode types are similar to each other in terms of design with some minor distinctions. Postal barcode standards can be classified in two main groups: two-state types that can encode only numerical characters and four-state ones that allow encoding both numerical digits and uppercase English characters.<\/p>\n<p><em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> can be used to create and read various two- and four-state postal standards, i.e. <em>RM4SCC<\/em>, <em>Postnet<\/em>, <em>Planet<\/em>, <em>Dutch KIX<\/em>, <em>Australia Post<\/em>, <em>OneCode<\/em>, and <em>Mailmark<\/em>. Further, this article describes how to work with postal types using the <em>Aspose.BarCode<\/em> library functional.<\/p>\n\n\n<div class=\"alert alert-primary\" role=\"alert\">\n\n<em>If you need any clarifications, feel free to reach out <a href=\"https:\/\/docs.aspose.com\/barcode\/barcode\/nodejsjava\/technical-support\/\">Aspose Technical Support<\/a>: ask your questions at <a href=\"https:\/\/forum.aspose.com\/c\/barcode\/13\">Aspose.Barcode Forum<\/a> or contact Aspose <a href=\"https:\/\/helpdesk.aspose.com\/\">Paid Support Helpdesk<\/a>.<\/em>\n<\/div>\n\n<h2 id=\"bar-height-settings\"><strong>Bar Height Settings<\/strong><\/h2>\n<p>By default, <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> enables automatic calculation of bar height and width for postal barcode standards depending on the <em>XDimension<\/em> value. It also enables manually customizing bar height regardless of barcode width through the <em>setBarHeight<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>.<\/p>\n<p>Following <em>Planet<\/em> and <em>RM4SCC<\/em> barcode images have been created varying bar height settings.<\/p>\n<table>\n<thead>\n<tr>\n<th>Bar Height Settings for <strong>Planet<\/strong><\/th>\n<th style=\"text-align:center\"><\/th>\n<th style=\"text-align:center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><p align=\"center\"><strong>Bar Height<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Is Set to None<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Is Set to 100 Pixels<\/strong><\/p><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetbarheightnone.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetbarheight100pixels.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>Bar Height Settings for <strong>RM4SCC<\/strong><\/th>\n<th style=\"text-align:center\"><\/th>\n<th style=\"text-align:center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><p align=\"center\"><strong>Bar Height<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Is Set to None<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Is Set to 100 Pixels<\/strong><\/p><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td style=\"text-align:center\"><img src=\"postalrm4sccbarheightnone.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalrm4sccbarheight100pixels.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"bar-filling-options\"><strong>Bar Filling Options<\/strong><\/h2>\n<p>The barcode library enables adjusting the appearance of postal barcode images in terms of setting full or empty filling for bars. Developers can generate postal barcodes with empty bars using the <em>setFilledBars<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a>. The default value of this parameter is <em>True<\/em>, meaning that the generated postal barcode image will have fully colored bars.<\/p>\n<p>Following <em>Planet<\/em> and <em>RM4SCC<\/em> barcode images have been generated using different bar filling settings.<\/p>\n<table>\n<thead>\n<tr>\n<th>Bar Filling for <strong>Planet<\/strong> Barcodes<\/th>\n<th style=\"text-align:center\"><\/th>\n<th style=\"text-align:center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Bar Filling Settings<\/strong><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Filled Bars<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Empty Bars<\/strong><\/p><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetfilledbars.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetemptybars.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>Bar Filling for <strong>RM4SCC<\/strong> Barcodes<\/th>\n<th style=\"text-align:center\"><\/th>\n<th style=\"text-align:center\"><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Bar Filling Settings<\/strong><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Filled Bars<\/strong><\/p><\/td>\n<td style=\"text-align:center\"><p align=\"center\"><strong>Empty Bars<\/strong><\/p><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td style=\"text-align:center\"><img src=\"postalrm4sccfilledbars.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalrm4sccemptybars.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"two-state-postal-barcodes\"><strong>Two-State Postal Barcodes<\/strong><\/h2>\n<p>Using <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em>, developers can create barcodes of two-state postal types, such as <em>Postnet<\/em> and <em>Planet<\/em>. These barcode standards allow encoding only numerical characters and require obligatory checksum controls. Code snippets and sample barcode images provided further demonstrate how to create postal barcodes of <em>Planet<\/em> and <em>Postnet<\/em> types.<\/p>\n<h3 id=\"planet-standard\"><strong>Planet Standard<\/strong><\/h3>\n<p><em>Planet<\/em> barcodes encode each character in five bars. Among them, three bars are full-length, and two bars are half-length.<\/p>\n<p align=\"center\"><img src=\"postalplanetbarcode.png\"><\/p> \n<h3 id=\"postnet-standard\"><strong>Postnet Standard<\/strong><\/h3>\n<p><em>Postnet<\/em> encodes each digit in five bars so that three bars are full-length and two bars are half-length.<\/p>\n<p align=\"center\"><img src=\"postalpostnetbarcode.png\"><\/p>\n<h2 id=\"specific-properties-of-two-state-barcode-generation\"><strong>Specific Properties of Two-State Barcode Generation<\/strong><\/h2>\n<p>The <em><strong>Aspose.BarCode<\/strong><\/em> library has several specificities in the way of working with two-state postal symbologies. They are associated with handling invalid barcode text and changing bar length. These special cases are outlined further.<\/p>\n<h3 id=\"handling-invalid-barcode-text-exception\"><strong>Handling Invalid Barcode Text Exception<\/strong><\/h3>\n<p>When invalid barcode text in passed to to the <em>setCodeText<\/em> method (in case of <em>Postnet<\/em> and <em>Planet<\/em> symbologies, this means entering any characters besides numerical digits), the default approach implemented in class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeGenerator\"><em>BarcodeGenerator<\/em><\/a> implies the necessity to filter out erroneous symbols that do not comply with the specification and then to generate a barcode image encoding suitable characters only. If developers need to establish special controls for such situations, they can request throwing an exception upon entering invalid characters through the <em>setCodeText<\/em> method. In this case, it is necessary to call the <em>setThrowExceptionWhenCodeTextIncorrect<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/BarcodeParameters\"><em>BarcodeParameters<\/em><\/a> passing <em>True<\/em>.<\/p>\n<h3 id=\"customizing-bar-height\"><strong>Customizing Bar Height<\/strong><\/h3>\n<p>By design, two-state postal barcodes contain long and short bars in such a way that the shorter bars are half-length with respect to the longer bars. <em><strong>Aspose.BarCode for Node.js via Java<\/strong><\/em> allows modifying bar height for short bars manually. To do this, the <em>setPostalShortBarHeight<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/PostalParameters\"><em>PostalParameters<\/em><\/a> needs to be used.<\/p>\n<p>Following barcode images have been created variyng short bar height.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Short Bar Height<\/th>\n<th style=\"text-align:center\">Is Set to 10 Pixels<\/th>\n<th style=\"text-align:center\">Is Set to 30 Pixels<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetshortbarheight10pixels.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalplanetshortbarheight30pixels.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"four-state-postal-types\"><strong>Four-State Postal Types<\/strong><\/h2>\n<p>The barcode library enables generating and reading several four-state postal barcode standards, including <em>RM4SCC<\/em>, <em>Dutch KIX<\/em>, <em>OneCode<\/em>, <em>Australia Post<\/em>, and <em>Mailmark<\/em>. By design, four-state barcode types use four different bar types to encode data: tracker (T), descender (D), ascender (A), and full (F). Therefore, each symbol is encoded in four bars meaning that two bits are encoded in one character. In general, four-state symbologies are designed as variations of the <em>RM4SCC<\/em> standard and support encoding numerical characters and uppercase English letters. All aforementioned four-state barcode types except <em>Dutch KIX<\/em> contain checksum controls. In addition, <em>Mailmark<\/em> and <em>Australia Post<\/em> support Reed-Solomon error correction to enable data recovery.<\/p>\n<h3 id=\"rm4scc-standard\"><strong>RM4SCC Standard<\/strong><\/h3>\n<p>The <em>RM4SCC<\/em> symbology can be used to encode numerical characters and uppercase English letters. In this barcode standard, each symbol in a barcode is encoded in four bars among which two bars are enlarged upwards and the other two bars - downwards. Using supported combinations of bars with different length, it is possible to encode up to 36 characters, i.e. 10 digits and 26 letters. <em>RM4SCC<\/em> contains obligatory checksum controls using the modulo 6 algorithm.<\/p>\n<p align=\"center\"><img src=\"postalrm4sccbarcode.png\"><\/p>\n<h3 id=\"dutch-kix-standard\"><strong>Dutch KIX Standard<\/strong><\/h3>\n<p>The Royal Dutch TPG Post of Netherlands uses the <em>Dutch KIX<\/em> barcode standard to facilitate automatic sorting of mails and process postal codes. It is similar to RM4SCC and allows encoding numericals and uppercase English letters. By design, it does not require checksum controls and do not contain start and stop symbols.<\/p>\n<p align=\"center\"><img src=\"postaldutchkixbarcode.png\"><\/p>\n<h3 id=\"onecode-standard\"><strong>OneCode Standard<\/strong><\/h3>\n<p><em>OneCode<\/em> allows encoding fixed-length sets of numerical characters, i.e. 20, 25, 29, or 31 digits. It supports eleven-bit cyclic redundancy verification to detect errors but does not include an error correction mechanism.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Number of Digits<\/th>\n<th style=\"text-align:center\">20 Digits<\/th>\n<th style=\"text-align:center\">25 Digits<\/th>\n<th style=\"text-align:center\">29 Digits<\/th>\n<th style=\"text-align:center\">31 Digits<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalonecodebarcode20digits.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalonecodebarcode25digits.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalonecodebarcode29digits.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalonecodebarcode31digits.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"australia-post-standard\"><strong>Australia Post Standard<\/strong><\/h3>\n<p>The <em>Australia Post<\/em> postal standard uses special two-digit format control code (FCC) fields and eight-digit sorting code (SC) fields to generate barcodes. FCC fields are intended to determine one of three supported subtypes that have various fixed lengths, i.e. 37, 52, or 67 bars. Moreover, barcodes may include a customer information (CI) field to specify one of available encoding types (numerical or alphanumeric characters). These settings can be customized through the <em>setAustralianPostEncodingTable<\/em> method of class <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/AustralianPostParameters\"><em>AustralianPostPatrameters<\/em><\/a>. Customer data can take 31 bars in barcodes with 67 bars or 16 bars in barcodes with 52 bars. <em>Australia Post<\/em> has checksum controls and supports Reed-Solomon error correction.<\/p>\n<p>Barcode data can be prepared using one of the supported formats as explained below.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">FCC Field<\/th>\n<th style=\"text-align:center\">Sorting Code Field<\/th>\n<th style=\"text-align:center\">Customer Information Field<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\">11<\/td>\n<td style=\"text-align:center\">8 digits<\/td>\n<td style=\"text-align:center\">None<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">59<\/td>\n<td style=\"text-align:center\">8 digits<\/td>\n<td style=\"text-align:center\">16 bars<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">62<\/td>\n<td style=\"text-align:center\">8 digits<\/td>\n<td style=\"text-align:center\">31 bars<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The FCC field can be determined through the <em>setAustralianPostEncodingTable<\/em> method that has to be called passing one of the values from the <a href=\"https:\/\/reference.aspose.com\/barcode\/nodejs\/global#CustomerInformationInterpretingType\"><em>CustomerInformationInterpretingType<\/em><\/a> global property listed in the table below.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Australia Post Encoding Table<\/th>\n<th>Supported Symbols<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\">CTable<\/td>\n<td>0-9, A-Z, a-z, space symbol, and #<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">NTable<\/td>\n<td>0-9<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center\">Other<\/td>\n<td>0, 1, 2, and 3 that correspond to H, A, D, and T states, respectively<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Following barcode images have been created varying FCC field settings.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Australia Post Subtypes<\/th>\n<th style=\"text-align:center\">FCC 11<\/th>\n<th style=\"text-align:center\">FCC 59 Table<\/th>\n<th style=\"text-align:center\">FCC 62N Table<\/th>\n<th style=\"text-align:center\">FCC 62C Table<\/th>\n<th style=\"text-align:center\">FCC 62C Other Table<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalaustraliapostfcc11.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalaustraliapostfcc59ntable.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalaustraliapostfcc62ntable.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalaustraliapostfcc62ctable.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalaustraliapostfcc62othertable.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">,<\/span> <span class=\"s\">&#34;5912345678ABCde&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAustralianPost<\/span><span class=\"o\">().<\/span><span class=\"na\">setAustralianPostEncodingTable<\/span><span class=\"o\">(<\/span><span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">C_TABLE<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">image<\/span> <span class=\"o\">=<\/span> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">generateBarCodeImage<\/span><span class=\"o\">();<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">reader<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarCodeReader<\/span><span class=\"o\">(<\/span><span class=\"n\">image<\/span><span class=\"o\">,<\/span> <span class=\"n\">DecodeType<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">setCustomerInformationInterpretingType<\/span><span class=\"o\">(<\/span><span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">C_TABLE<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">readBarCodes<\/span><span class=\"o\">().<\/span><span class=\"na\">forEach<\/span><span class=\"o\">(<\/span><span class=\"n\">function<\/span><span class=\"o\">(<\/span><span class=\"n\">result<\/span><span class=\"o\">,<\/span> <span class=\"n\">i<\/span><span class=\"o\">,<\/span> <span class=\"n\">results<\/span><span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode Type: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeType<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode CodeText: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeText<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">});<\/span>\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">,<\/span> <span class=\"s\">&#34;59123456781234567&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAustralianPost<\/span><span class=\"o\">().<\/span><span class=\"na\">setAustralianPostEncodingTable<\/span><span class=\"o\">(<\/span><span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">N_TABLE<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">image<\/span> <span class=\"o\">=<\/span> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">generateBarCodeImage<\/span><span class=\"o\">();<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">reader<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarCodeReader<\/span><span class=\"o\">(<\/span><span class=\"n\">image<\/span><span class=\"o\">,<\/span> <span class=\"n\">DecodeType<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">setCustomerInformationInterpretingType<\/span><span class=\"o\">(<\/span><span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">N_TABLE<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">readBarCodes<\/span><span class=\"o\">().<\/span><span class=\"na\">forEach<\/span><span class=\"o\">(<\/span><span class=\"n\">function<\/span><span class=\"o\">(<\/span><span class=\"n\">result<\/span><span class=\"o\">,<\/span> <span class=\"n\">i<\/span><span class=\"o\">,<\/span> <span class=\"n\">results<\/span><span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode Type: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeType<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode CodeText: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeText<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">});<\/span>\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-java\" data-lang=\"java\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">generator<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarcodeGenerator<\/span><span class=\"o\">(<\/span><span class=\"n\">EncodeTypes<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">,<\/span> <span class=\"s\">&#34;59123456780123012301230123&#34;<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">getParameters<\/span><span class=\"o\">().<\/span><span class=\"na\">getBarcode<\/span><span class=\"o\">().<\/span><span class=\"na\">getAustralianPost<\/span><span class=\"o\">().<\/span><span class=\"na\">setAustralianPostEncodingTable<\/span><span class=\"o\">(<\/span><span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">OTHER<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">image<\/span> <span class=\"o\">=<\/span> <span class=\"n\">generator<\/span><span class=\"o\">.<\/span><span class=\"na\">generateBarCodeImage<\/span><span class=\"o\">();<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">let<\/span> <span class=\"n\">reader<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"n\">BarCodeReader<\/span><span class=\"o\">(<\/span><span class=\"n\">image<\/span><span class=\"o\">,<\/span> <span class=\"n\">DecodeType<\/span><span class=\"o\">.<\/span><span class=\"na\">AUSTRALIA_POST<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">CustomerInformationInterpretingType<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CustomerInformationInterpretingType<\/span><span class=\"o\">.<\/span><span class=\"na\">OTHER<\/span><span class=\"o\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">reader<\/span><span class=\"o\">.<\/span><span class=\"na\">readBarCodes<\/span><span class=\"o\">().<\/span><span class=\"na\">forEach<\/span><span class=\"o\">(<\/span><span class=\"n\">function<\/span><span class=\"o\">(<\/span><span class=\"n\">result<\/span><span class=\"o\">,<\/span> <span class=\"n\">i<\/span><span class=\"o\">,<\/span> <span class=\"n\">results<\/span><span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">   <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode Type: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeType<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">   <span class=\"n\">console<\/span><span class=\"o\">.<\/span><span class=\"na\">log<\/span><span class=\"o\">(<\/span><span class=\"s\">&#34;BarCode CodeText: &#34;<\/span> <span class=\"o\">+<\/span> <span class=\"n\">result<\/span><span class=\"o\">.<\/span><span class=\"na\">getCodeText<\/span><span class=\"o\">());<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"o\">});<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h3 id=\"mailmark-standard\"><strong>Mailmark Standard<\/strong><\/h3>\n<p>The <em>Mailmark<\/em> postal standard has been introduced by Royal Mail of the United Kingdom. In general, its design is similar to <em>RM4SCC<\/em>; however, it has requires entering barcode information in the strict format and does not support adding customer data. This barcode type can be used to encode numericals, uppercase English letters, and space. It has checksum controls and supports Reed-Solomon error correction.<br>\n<em>Mailmark<\/em> has two main subtypes:<\/p>\n<ul>\n<li><strong>Type L<\/strong> - allows encoding 26 characters<\/li>\n<li><strong>Type C<\/strong> - allows encoding 22 characters<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:center\">Mailmark Subtype<\/th>\n<th style=\"text-align:center\">Type C<\/th>\n<th style=\"text-align:center\">Type L<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalmailmarkctype.png\"><\/td>\n<td style=\"text-align:center\"><img src=\"postalmailmarkltype.png\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n      "}]}}