# MicroPDF417

MicroPDF417 is two-dimensional (2D) stacked barcode symbology invented in 1996, by Frederick Schuessler, Kevin Hunter, Sundeep Kumar and Cary Chu from Symbol Technologies company. MicroPDF417 consists from specially encoded Row Address Patterns (RAP) columns and aligned to them Data columns encoded in "417" sequence which was invented in 1990. In 2006, the standard was registered as ISO/IEC 24728:2006.
MicroPDF417 barcode can be read with both barcode reader technologies like laser scanners and camera-based readers. As most of 2D barcodes, MicroPDF417 standard contains Reed–Solomon error correction with ability to read corrupted images and high data density. However, data which can be encoded in MicroPDF417 is only 150 bytes or 250 alphanumeric characters in the biggest 4-columns version. Also, because of design, MicroPDF417 barcode can be used only for high-quality documents and images.
MicroPDF417 in common modes can encode text, numeric, binary data and Unicode text with Extended Channel Interpretation. Additionally, MicroPDF417 contains special modes which can encode text and numeric data in special formats, which can be used, as an example, in GS1 Composite bar code symbology.

## History and standards

MicroPDF417 barcode was patented in 1996, by Frederick Schuessler, Kevin Hunter, Sundeep Kumar and Cary Chu from Symbol Technologies company. MicroPDF417 is an extension of PDF417 barcode and uses the same principles of data encoding. Before 2006, the standard can be obtained only from AIM store as ITS MicroPDF417 standard. At that time, it is used as part of ITS - EAN.UCC Composite Symbology. In 2006, MicroPDF417 standard was brought out as ISO/IEC 24728:2006 and can be used independently or as part of GS1 Composite barcode symbology.

## Application

MicroPDF417 is mostly used to add extended data to linear barcodes. MicroPDF417 has high encoding density and in this way, it can add more additional data in lower space. At this time, it is used in inventory management and goods labeling as part of EAN.UCC Composite Symbology and GS1 Composite barcode symbology. Most of barcode printers and barcode scanners have MicroPDF417 support.

## Barcode design

MicroPDF417 barcode symbol consists from at least two Row Address Patterns (RAP) columns which are used to detect row numbers and aligned to them Data Columns. MicroPDF417 barcode symbol has four versions with 1, 2, 3 and 4 data columns. The barcode can be split to the following elements:$^{:5.2.3}$
* Quiet zone
* Left RAP column
* Variable Data columns and optional Center RAP column
** One Data columns version: One Data column
** Two Data columns version: Two Data columns
** Three Data columns version: One Data column, Center RAP column, Two Data columns
** Four Data columns version: Two Data columns, Center RAP column, Two Data columns
* Right RAP column with stop bar
* Quiet zone
Every MicroPDF417 barcode data column versions can be split into predefined numbers of rows which are different for every version.$^{:5.2.2}$ Row height should be from 2 to 5 times higher than minimal module (bar or space) width.$^{:5.8.2}$
MicroPDF417 symbol versions :
| Data Columns | Allowed Rows | Structure |
| 1 | 11, 14, 17, 20, 24, 28 | This file represents MicroPDF417 barcode(symbol) structure with data column 1 |
| 2 | 8, 11, 14, 17, 20, 23, 26 | This file represents MicroPDF417 barcode(symbol) structure with data column 2 |
| 3 | 6, 8, 10, 12, 15, 20, 26, 32, 38, 44 | This file represents MicroPDF417 barcode(symbol) structure with data column 3 |
| 4 | 4, 6, 8, 10, 12, 15, 20, 26, 32, 38, 44 | This file represents MicroPDF417 barcode(symbol) structure with data columns 4 |

### RAP columns structure

MicroPDF417 Row Address Patterns (RAP)$^{:5.2.5}$ are stacked into columns. Each RAP is used as indicator of row number, but RAP is not the same as row number. Every MicroPDF417 RAP consists from 10 modules, which are split to 3 black bars and 3 white spaces. Bars and spaces size can vary from 1 to 5. Each RAP row starts from black bar and ends with white space. Right RAP has additional completing black bar.
MicroPDF417 Row Address Patterns have 52 values which are used for left and right columns and 52 other values which are used only for Center columns. RAP has values from 1 to 52. One and two data columns MicroPDF417 barcode use only Left and Right RAP columns, three and four column versions additionally use Center RAP column.
All of Row Address Patterns in MicroPDF417 from Left, Right and Center columns use special sequences which are called Row Number Assignments (RNA).$^{:5.11.3}$ The unique combination of RNA defines MicroPDF417 version and equality of current RAP number to row number.
As an example, MicroPDF417 4 columns and 4 rows version has Left RAP, which starts from 47 and ends 50, Center RAP starts from 19 and ends 22, Right RAP starts from 43 and ends 46. The combination of these 3 sequences in the same area of the image defines 4 columns and 4 rows MicroPDF417 version and gives answer which RAP number identifies current row.

### Data codewords

MicroPDF417 Data codewords encoding is similar to PDF417 barcode. Every Data codeword$^{:5.3.1}$ row has width of 17 modules, split to 4 black bars and 4 white spaces with variable size from 1 to 6 modules. Each codeword represents a number from 0 to 928. The set of codewords is represented in each of three clusters with numbers 0, 3 and 6.
The codeword cluster number can be counted by number of Left RAP (values from 1 to 52) in the current row with the following formula:$^{:5.11.1}$ $cluster=((LeftRAP-1){\pmod {3}})*3$

### Error correction

MicroPDF417 uses Reed–Solomon error correction.$^{:5.10}$ Amount of error correction codewords are fixed for each barcode version.$^{:5.2.2}$ MicroPDF417 has from 28% to 67% symbol capacity filled by errors correction codewords. MicroPDF417 error correction can recover erasures and substitution errors, where:$^{:5.7.2}$
* erasures errors correction ability: Error Correction Codewords – 1;
* substitution errors: (Error Correction Codewords – 1) / 2.

### Example of MicroPDF417 codewords placement

Here is example how all of these codewords are assembled into MicroPDF417 symbol:$^{:5.11}$
MicroPDF417 barcode structure 4 columns 4 rows :
| Left RAP | Data Column 1 | Data Column 2 | Center RAP | Data Column 3 | Data Column 4 | Right RAP |
| LR47 | D7 | D6 | CR19 | D5 | D4 | RR43 |
| LR48 | D3 | D2 | CR20 | D1 | D0 | RR44 |
| LR49 | E7 | E6 | CR21 | E5 | E4 | RR45 |
| LR50 | E3 | E2 | CR22 | E1 | E0 | RR46 |
LR(x) - Left Row Address Patterns (RAP) identifier. D(x) - Data codeword. CR(x) - Center Row Address Patterns (RAP) identifier. RR(x) - Right Row Address Patterns (RAP) identifier. E(x) - Error correction codeword.

## Encoding

MicroPDF417 barcode has 929 data codewords, where 900 data codewords (0 - 899) are available in each mode for data encoding and 29 (900 - 928) codewords are assigned to specific functions,$^{:5.4.1}$ most of which defines data encoding modes. Encoding modes can be split into two encoding types: common modes for ordinary binary or text data encoding and special modes which can be used to encode special industrial modes.

### Common modes

MicroPDF417 common encoding modes is similar to PDF417 encoding modes and includes:$^{:5.4.1.1}$
* Numeric mode which includes digits encoding: 0 – 9;
* Text mode which includes around 100 characters from ANSI character set (including digits, uppercase and lowercase letters, punctuation and special characters);
* Byte mode which encodes bytes values 0 – 255;
* Unicode characters with Extended Channel Interpretation submodes.$^{:5.5}$
Any of these modes can be combined in mixed mode$^{:AnnexN}$ to obtain better data compaction and reduce MicroPDF417 symbol size.

### Special modes

MicroPDF417 can encode data in special industrial modes,$^{:5.4.1.5}$ which includes:
* UCC/EAN-128 modes, which are used to encode with best data compaction GS1 Application Identifiers data;
* UCC/EAN-128 "Linked" modes, which are used to encode with best data compaction GS1 Application Identifiers data and set "Linked" state for the barcode, which means that the barcode is connected to linear component;
* EAN.UCC Composite symbol "Linked" mode$^{:5.4.1.6}$ which is used to encode data for GS1 Composite bar code symbology ISO/IEC 24723:2010;
* "05 Macro" and "06 Macro" string from ISO/IEC 15434:2019, which encode industry-specific headers and trailers in short way;
* Code 128 emulation modes which indicate that decoder must return symbol identification as Code 128 instead of MicroPDF417.

### Structured append

MicroPDF417 barcode allows to add metadata$^{:AnnexH}$ to the barcode symbol which can add description of current barcode symbol. However, because MicroPDF417 has restricted amount of capacity it is used rarely. Some structured append fields cannot be omitted and set in case structured append is added to the symbol, some fields are optional. Possible structured append fields you can see in the following table:
Structured Append MicroPDF417 fields :
| Field Name | Availability | Value Type | Description |
| Segment Index | Mandatory | Numeric | Index of current MicroPDF417 symbol in unique barcodes sequence (0 - 99 998) |
| File ID | Mandatory | Numeric | A variable length field which identifies current unique barcodes sequence (barcode file). Field size not limited by standard |
| File Name | Optional | Text | Name of the barcode file in free text format |
| Segment Count | Optional | Numeric | Count of current MicroPDF417 symbols in unique barcodes sequence (1 - 99 999) |
| Time Stamp | Optional | Numeric | Time of barcode file creation in format: elapsed time in seconds since 1970:01:01:00:00:00 GMT |
| Sender | Optional | Text | Sender of barcode file in free text format |
| Addressee | Optional | Text | Address of barcode file sender in free text format |
| File Size | Optional | Numeric | Size in bytes of barcode file |
| Checksum | Optional | Numeric | Checksum of full barcode file in 16-bit CCITT-16 (x^16 + x^12 + x^5 + 1) |