also looking at this
chore(deps): update dependency react-dom to 19.2.7
#2138
222 files
+16350
-1825
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -77,12 +77,12 @@ const sidebar = [ | ||
| 77 | 77 | text: 'EAN / UPC', |
| 78 | 78 | link: '/api/barcode/EAN', |
| 79 | 79 | items: [ |
| 80 | { text: 'EAN-13', link: '/api/barcode/EAN/EAN13' }, | |
| 81 | { text: 'EAN-8', link: '/api/barcode/EAN/EAN8' }, | |
| 82 | { text: 'EAN-5', link: '/api/barcode/EAN/EAN5' }, | |
| 83 | { text: 'EAN-2', link: '/api/barcode/EAN/EAN2' }, | |
| 84 | { text: 'UPC-A', link: '/api/barcode/EAN/UPCA' }, | |
| 85 | { text: 'UPC-E', link: '/api/barcode/EAN/UPCE' }, | |
| 80 | { text: 'EAN-13', link: '/api/barcode/EAN/EAN-13' }, | |
| 81 | { text: 'EAN-8', link: '/api/barcode/EAN/EAN-8' }, | |
| 82 | { text: 'EAN-5', link: '/api/barcode/EAN/EAN-5' }, | |
| 83 | { text: 'EAN-2', link: '/api/barcode/EAN/EAN-2' }, | |
| 84 | { text: 'UPC-A', link: '/api/barcode/EAN/UPC-A' }, | |
| 85 | { text: 'UPC-E', link: '/api/barcode/EAN/UPC-E' }, | |
| 86 | 86 | ] |
| 87 | 87 | }, |
| 88 | 88 | { |
No changes to show.
| @@ -0,0 +1,153 @@ | ||
| 1 | # EAN-2 | |
| 2 | ||
| 3 | EAN-2 is a supplemental two-digit barcode typically used for periodical publications to indicate issue numbers. It's the smallest of the EAN supplemental barcodes and must be used in conjunction with EAN-13, EAN-8, or UPC barcodes. | |
| 4 | ||
| 5 | ## Basic Usage | |
| 6 | ||
| 7 | ```ts | |
| 8 | import { barcode } from '@stacksjs/qrx' | |
| 9 | ||
| 10 | barcode('#barcode', '53', { format: 'EAN2' }) | |
| 11 | ``` | |
| 12 | ||
| 13 | [!NOTE] Image needed: Basic EAN-2 barcode example | |
| 14 | ||
| 15 | ## Structure | |
| 16 | ||
| 17 | An EAN-2 barcode consists of: | |
| 18 | ||
| 19 | - Exactly 2 digits | |
| 20 | - No check digit | |
| 21 | - Must be used as a supplement | |
| 22 | - Values from 00-99 | |
| 23 | ||
| 24 | ## Usage with Main Barcode | |
| 25 | ||
| 26 | ```ts | |
| 27 | import { barcode } from '@stacksjs/qrx' | |
| 28 | ||
| 29 | barcode('#barcode') | |
| 30 | .EAN13('9771234567003') | |
| 31 | .blank(20) | |
| 32 | .EAN2('53', { | |
| 33 | height: 85, | |
| 34 | textPosition: 'top', | |
| 35 | fontSize: 16 | |
| 36 | }) | |
| 37 | .render() | |
| 38 | ``` | |
| 39 | ||
| 40 | [!NOTE] Image needed: EAN-13 with EAN-2 add-on example | |
| 41 | ||
| 42 | ## Customization Options | |
| 43 | ||
| 44 | ```ts | |
| 45 | import { barcode } from '@stacksjs/qrx' | |
| 46 | ||
| 47 | barcode('#barcode', '53', { | |
| 48 | format: 'EAN2', | |
| 49 | width: 2, | |
| 50 | height: 85, | |
| 51 | displayValue: true, | |
| 52 | font: 'OCRB', | |
| 53 | fontSize: 16, | |
| 54 | textMargin: 0, | |
| 55 | textPosition: 'top' | |
| 56 | }) | |
| 57 | ``` | |
| 58 | ||
| 59 | ## Common Applications | |
| 60 | ||
| 61 | 1. Magazine Issues | |
| 62 | - ```ts | |
| 63 | // Issue 12 of a magazine | |
| 64 | barcode('#barcode', '12', { format: 'EAN2' }) | |
| 65 | ``` | |
| 66 | 2. Newspaper Editions | |
| 67 | - ```ts | |
| 68 | // Sunday edition (01) | |
| 69 | barcode('#barcode', '01', { format: 'EAN2' }) | |
| 70 | ``` | |
| 71 | 3. Version Indicators | |
| 72 | - ```ts | |
| 73 | // Version 2.0 | |
| 74 | barcode('#barcode', '20', { format: 'EAN2' }) | |
| 75 | ``` | |
| 76 | ||
| 77 | [!NOTE] Image needed: Real-world application examples | |
| 78 | ||
| 79 | ## Positioning Guidelines | |
| 80 | ||
| 81 | 1. Standard Placement | |
| 82 | - Right-aligned with main barcode | |
| 83 | - Specific gap width (9-12 modules) | |
| 84 | - Baseline alignment with main barcode | |
| 85 | 2. Height Considerations | |
| 86 | - ```ts | |
| 87 | // Typically taller than main barcode | |
| 88 | barcode('#barcode', '53', { | |
| 89 | format: 'EAN2', | |
| 90 | height: 85 // Compared to standard 70 | |
| 91 | }) | |
| 92 | ``` | |
| 93 | ||
| 94 | [!NOTE] Image needed: Positioning and alignment diagram | |
| 95 | ||
| 96 | ## Error Handling | |
| 97 | ||
| 98 | ```ts | |
| 99 | import { barcode } from '@stacksjs/qrx' | |
| 100 | ||
| 101 | barcode('#barcode', '53', { | |
| 102 | format: 'EAN2', | |
| 103 | valid: (valid) => { | |
| 104 | if (!valid) { | |
| 105 | console.error('Invalid EAN-2') | |
| 106 | // Handle invalid input | |
| 107 | } | |
| 108 | } | |
| 109 | }) | |
| 110 | ``` | |
| 111 | ||
| 112 | ## Best Practices | |
| 113 | ||
| 114 | 1. Usage Guidelines | |
| 115 | - Always use with main barcode | |
| 116 | - Maintain standard spacing | |
| 117 | - Use consistent height ratio | |
| 118 | - Validate 2-digit input | |
| 119 | - Consider scanner compatibility | |
| 120 | 2. Common Patterns | |
| 121 | - 00-09: Daily publications | |
| 122 | - 10-99: Weekly/monthly publications | |
| 123 | ||
| 124 | ## Technical Notes | |
| 125 | ||
| 126 | - No check digit mechanism | |
| 127 | - Must be exactly 2 digits | |
| 128 | - Cannot be used standalone | |
| 129 | - Scanner must support add-ons | |
| 130 | - Standard right-alignment required | |
| 131 | - Smaller than EAN-5 supplement | |
| 132 | ||
| 133 | ## Migration Considerations | |
| 134 | ||
| 135 | If you need more capacity, consider using EAN-5 instead: | |
| 136 | ||
| 137 | ```ts | |
| 138 | // EAN-2 version | |
| 139 | barcode('#barcode') | |
| 140 | .EAN13('9771234567003') | |
| 141 | .blank(20) | |
| 142 | .EAN2('53') | |
| 143 | .render() | |
| 144 | ||
| 145 | // EAN-5 equivalent | |
| 146 | barcode('#barcode') | |
| 147 | .EAN13('9771234567003') | |
| 148 | .blank(20) | |
| 149 | .EAN5('00053') | |
| 150 | .render() | |
| 151 | ``` | |
| 152 | ||
| 153 | [!NOTE] Image needed: Comparison between EAN-2 and EAN-5 supplements | |
Renamed from docs/api/barcode/EAN/EAN5.md. The contents are unchanged.
Renamed from docs/api/barcode/EAN/EAN8.md. The contents are unchanged.
| @@ -1,146 +0,0 @@ | ||
| 1 | # EAN & UPC Barcodes | |
| 2 | ||
| 3 | EAN (European Article Number) and UPC (Universal Product Code) are standardized barcodes used worldwide for retail products. These barcode systems are managed by GS1 and are crucial for product identification in retail environments. | |
| 4 | ||
| 5 | ## Supported Formats | |
| 6 | ||
| 7 | qrx supports the following EAN/UPC formats: | |
| 8 | - EAN-13 (GTIN-13) | |
| 9 | - EAN-8 | |
| 10 | - EAN-5 (Add-on) | |
| 11 | - EAN-2 (Add-on) | |
| 12 | - UPC-A | |
| 13 | - UPC-E | |
| 14 | ||
| 15 | ## Basic Usage | |
| 16 | ||
| 17 | ```ts | |
| 18 | import { barcode } from '@stacksjs/qrx' | |
| 19 | ||
| 20 | // EAN-13 example | |
| 21 | barcode('#barcode', '5901234123457', { format: 'EAN13' }) | |
| 22 | ||
| 23 | // UPC example | |
| 24 | barcode('#barcode', '123456789999', { format: 'UPC' }) | |
| 25 | ||
| 26 | // EAN-8 example | |
| 27 | barcode('#barcode', '96385074', { format: 'EAN8' }) | |
| 28 | ||
| 29 | // Add-on examples | |
| 30 | barcode('#barcode', '54495', { format: 'EAN5' }) | |
| 31 | barcode('#barcode', '53', { format: 'EAN2' }) | |
| 32 | ``` | |
| 33 | ||
| 34 | ## Common Options | |
| 35 | ||
| 36 | All EAN/UPC formats support these basic options: | |
| 37 | ||
| 38 | ```ts | |
| 39 | import { barcode } from '@stacksjs/qrx' | |
| 40 | ||
| 41 | barcode('#barcode', '5901234123457', { | |
| 42 | format: 'EAN13', | |
| 43 | width: 2, // Bar width | |
| 44 | height: 100, // Barcode height | |
| 45 | displayValue: true, // Show text below barcode | |
| 46 | fontSize: 20, // Text size | |
| 47 | font: 'monospace', // Text font | |
| 48 | textAlign: 'center', // Text alignment | |
| 49 | textPosition: 'bottom', // Text position | |
| 50 | background: '#ffffff', // Background color | |
| 51 | lineColor: '#000000', // Bar color | |
| 52 | flat: false, // Remove guard bars if true | |
| 53 | }) | |
| 54 | ``` | |
| 55 | ||
| 56 | ## Add-on Barcodes | |
| 57 | ||
| 58 | EAN-5 and EAN-2 are supplemental barcodes typically used with EAN-13 or UPC-A. They can be combined using the advanced syntax: | |
| 59 | ||
| 60 | ```ts | |
| 61 | import { barcode } from '@stacksjs/qrx' | |
| 62 | ||
| 63 | barcode('#barcode') | |
| 64 | .EAN13('1234567890128') | |
| 65 | .blank(20) // Creates space between barcodes | |
| 66 | .EAN5('12345', { | |
| 67 | height: 85, | |
| 68 | textPosition: 'top', | |
| 69 | fontSize: 16 | |
| 70 | }) | |
| 71 | .render() | |
| 72 | ``` | |
| 73 | ||
| 74 | [!NOTE] Image needed: Example of combined EAN-13 and EAN-5 barcodes | |
| 75 | ||
| 76 | ## Flat Option | |
| 77 | ||
| 78 | EAN-13, EAN-8, and UPC formats support a `flat` option to remove guard bars: | |
| 79 | ||
| 80 | ```ts | |
| 81 | import { barcode } from '@stacksjs/qrx' | |
| 82 | ||
| 83 | barcode('#barcode', '1234567890128', { | |
| 84 | format: 'EAN13', | |
| 85 | flat: true | |
| 86 | }) | |
| 87 | ``` | |
| 88 | ||
| 89 | [!NOTE] Image needed: Comparison of EAN-13 with and without guard bars | |
| 90 | ||
| 91 | ## Check Digits | |
| 92 | ||
| 93 | EAN-13, UPC, and EAN-8 include a check digit for validation. If not provided, it's automatically calculated: | |
| 94 | ||
| 95 | ```ts | |
| 96 | barcode('#barcode', '590123412345', { format: 'EAN13' }) | |
| 97 | // Automatically adds check digit: '5901234123457' | |
| 98 | ``` | |
| 99 | ||
| 100 | ||
| 101 | ## OCR-B Font Support | |
| 102 | ||
| 103 | Standard EAN/UPC barcodes typically use OCR-B font. You can specify this using @font-face: | |
| 104 | ||
| 105 | ```ts | |
| 106 | barcode('#barcode', '123456789012', { | |
| 107 | format: 'EAN13', | |
| 108 | font: 'OCRB', | |
| 109 | fontSize: 18, | |
| 110 | textMargin: 0 | |
| 111 | }) | |
| 112 | ``` | |
| 113 | ||
| 114 | [!NOTE] Remember to load the OCR-B font via @font-face before generating the barcode. | |
| 115 | ||
| 116 | ## Common Use Cases | |
| 117 | ||
| 118 | 1. Retail Products | |
| 119 | - Product identification | |
| 120 | - Inventory management | |
| 121 | - Point of sale scanning | |
| 122 | 2. ISBN Books | |
| 123 | - EAN-13 format with "978" or "979" prefix | |
| 124 | - Optional EAN-5 add-on for price | |
| 125 | 3. Magazines & Periodicals | |
| 126 | - ISSN numbers in EAN-13 format | |
| 127 | - EAN-2 add-on for issue numbers | |
| 128 | ||
| 129 | ## Detailed Format Documentation | |
| 130 | ||
| 131 | For detailed information about specific formats, see: | |
| 132 | ||
| 133 | - EAN-13 - 13-digit format, most common worldwide | |
| 134 | - EAN-8 - 8-digit format for smaller packages | |
| 135 | - EAN-5 - 5-digit supplemental barcode | |
| 136 | - EAN-2 - 2-digit supplemental barcode | |
| 137 | - UPC-A - 12-digit format, common in North America | |
| 138 | - UPC-E - Compressed 8-digit format | |
| 139 | ||
| 140 | ## Technical Notes | |
| 141 | ||
| 142 | - All formats include automatic check digit calculation | |
| 143 | - Guard patterns are automatically added _(unless `flat: true`)_ | |
| 144 | - Text alignment and positioning can be customized | |
| 145 | - Support for supplemental EAN-2/EAN-5 add-ons | |
| 146 | - Automatic font sizing based on barcode dimensions | |
| @@ -1,137 +1,147 @@ | ||
| 1 | # EAN-13 | |
| 1 | # EAN & UPC Barcodes | |
| 2 | 2 | |
| 3 | EAN-13 _(European Article Number)_ is the most widely used retail barcode format globally. It consists of 13 digits and is also known as GTIN-13 (Global Trade Item Number). | |
| 3 | EAN (European Article Number) and UPC (Universal Product Code) are standardized barcodes used worldwide for retail products. These barcode systems are managed by GS1 and are crucial for product identification in retail environments. | |
| 4 | ||
| 5 | ## Supported Formats | |
| 6 | ||
| 7 | qrx supports the following EAN/UPC formats: | |
| 8 | ||
| 9 | - [EAN-13](/api/barcode/EAN/EAN-13) _(GTIN-13)_ | |
| 10 | - [EAN-8](/api/barcode/EAN/EAN-8) | |
| 11 | - [EAN-5](/api/barcode/EAN/EAN-5) _(Add-on)_ | |
| 12 | - [EAN-2](/api/barcode/EAN/EAN-2) _(Add-on)_ | |
| 13 | - [UPC-A](/api/barcode/EAN/UPC-A) | |
| 14 | - [UPC-E](/api/barcode/EAN/UPC-E) | |
| 4 | 15 | |
| 5 | 16 | ## Basic Usage |
| 6 | 17 | |
| 7 | 18 | ```ts |
| 8 | 19 | import { barcode } from '@stacksjs/qrx' |
| 9 | 20 | |
| 21 | // EAN-13 example | |
| 10 | 22 | barcode('#barcode', '5901234123457', { format: 'EAN13' }) |
| 11 | ``` | |
| 12 | ||
| 13 | [!NOTE] Image needed: Basic EAN-13 barcode example | |
| 14 | 23 | |
| 15 | ## Structure | |
| 24 | // UPC example | |
| 25 | barcode('#barcode', '123456789999', { format: 'UPC' }) | |
| 16 | 26 | |
| 17 | An EAN-13 barcode consists of: | |
| 18 | ||
| 19 | - First 2-3 digits: Country/GS1 prefix | |
| 20 | - Next 4-5 digits: Manufacturer code | |
| 21 | - Next 5 digits: Product code | |
| 22 | - Last digit: Check digit (automatically calculated) | |
| 23 | ||
| 24 | ## Auto Check Digit | |
| 25 | ||
| 26 | The check digit is automatically calculated if omitted: | |
| 27 | ||
| 28 | ```ts | |
| 29 | import { barcode } from '@stacksjs/qrx' | |
| 27 | // EAN-8 example | |
| 28 | barcode('#barcode', '96385074', { format: 'EAN8' }) | |
| 30 | 29 | |
| 31 | // These generate the same barcode | |
| 32 | barcode('#barcode', '590123412345', { format: 'EAN13' }) // Auto-calculates check digit | |
| 33 | barcode('#barcode', '5901234123457', { format: 'EAN13' }) // Manual check digit | |
| 30 | // Add-on examples | |
| 31 | barcode('#barcode', '54495', { format: 'EAN5' }) | |
| 32 | barcode('#barcode', '53', { format: 'EAN2' }) | |
| 34 | 33 | ``` |
| 35 | 34 | |
| 36 | ## Advanced Options | |
| 35 | ## Common Options | |
| 36 | ||
| 37 | All EAN/UPC formats support these basic options: | |
| 37 | 38 | |
| 38 | 39 | ```ts |
| 39 | 40 | import { barcode } from '@stacksjs/qrx' |
| 40 | 41 | |
| 41 | 42 | barcode('#barcode', '5901234123457', { |
| 42 | 43 | format: 'EAN13', |
| 43 | width: 2, | |
| 44 | height: 100, | |
| 45 | displayValue: true, | |
| 46 | font: 'OCRB', | |
| 47 | fontSize: 18, | |
| 48 | textMargin: 0, | |
| 49 | flat: false, | |
| 50 | lastChar: '>' | |
| 44 | width: 2, // Bar width | |
| 45 | height: 100, // Barcode height | |
| 46 | displayValue: true, // Show text below barcode | |
| 47 | fontSize: 20, // Text size | |
| 48 | font: 'monospace', // Text font | |
| 49 | textAlign: 'center', // Text alignment | |
| 50 | textPosition: 'bottom', // Text position | |
| 51 | background: '#ffffff', // Background color | |
| 52 | lineColor: '#000000', // Bar color | |
| 53 | flat: false, // Remove guard bars if true | |
| 51 | 54 | }) |
| 52 | 55 | ``` |
| 53 | 56 | |
| 54 | ## Flat Mode | |
| 57 | ## Add-on Barcodes | |
| 55 | 58 | |
| 56 | Remove guard bars for special applications: | |
| 59 | EAN-5 and EAN-2 are supplemental barcodes typically used with EAN-13 or UPC-A. They can be combined using the advanced syntax: | |
| 57 | 60 | |
| 58 | 61 | ```ts |
| 59 | 62 | import { barcode } from '@stacksjs/qrx' |
| 60 | 63 | |
| 61 | barcode('#barcode', '5901234123457', { | |
| 62 | format: 'EAN13', | |
| 63 | flat: true | |
| 64 | }) | |
| 64 | barcode('#barcode') | |
| 65 | .EAN13('1234567890128') | |
| 66 | .blank(20) // Creates space between barcodes | |
| 67 | .EAN5('12345', { | |
| 68 | height: 85, | |
| 69 | textPosition: 'top', | |
| 70 | fontSize: 16 | |
| 71 | }) | |
| 72 | .render() | |
| 65 | 73 | ``` |
| 66 | 74 | |
| 67 | [!NOTE] Image needed: EAN-13 barcode in flat mode | |
| 75 | [!NOTE] Image needed: Example of combined EAN-13 and EAN-5 barcodes | |
| 68 | 76 | |
| 69 | ## Last Character | |
| 77 | ## Flat Option | |
| 70 | 78 | |
| 71 | Add a character after the barcode (commonly '>') | |
| 79 | EAN-13, EAN-8, and UPC formats support a `flat` option to remove guard bars: | |
| 72 | 80 | |
| 73 | 81 | ```ts |
| 74 | 82 | import { barcode } from '@stacksjs/qrx' |
| 75 | 83 | |
| 76 | barcode('#barcode', '5901234123457', { | |
| 84 | barcode('#barcode', '1234567890128', { | |
| 77 | 85 | format: 'EAN13', |
| 78 | lastChar: '>' | |
| 86 | flat: true | |
| 79 | 87 | }) |
| 80 | 88 | ``` |
| 81 | 89 | |
| 82 | [!NOTE] Image needed: EAN-13 barcode with last character | |
| 90 | [!NOTE] Image needed: Comparison of EAN-13 with and without guard bars | |
| 83 | 91 | |
| 84 | ## Add-on Support | |
| 92 | ## Check Digits | |
| 85 | 93 | |
| 86 | Combine with EAN-2 or EAN-5 supplemental barcodes: | |
| 87 | ||
| 88 | import { barcode } from '@stacksjs/qrx' | |
| 94 | [EAN-13](/api/barcode/EAN/EAN-13), [UPC](/api/barcode/EAN/UPC), and [EAN-8](/api/barcode/EAN/EAN-8) include a check digit for validation. If not provided, it's automatically calculated: | |
| 89 | 95 | |
| 90 | 96 | ```ts |
| 91 | barcode('#barcode') | |
| 92 | .EAN13('9781234567897') | |
| 93 | .blank(20) | |
| 94 | .EAN5('12345', { height: 85, textPosition: 'top' }) | |
| 95 | .render() | |
| 97 | barcode('#barcode', '590123412345', { format: 'EAN13' }) | |
| 98 | // Automatically adds check digit: '5901234123457' | |
| 96 | 99 | ``` |
| 97 | 100 | |
| 98 | [!NOTE] Image needed: EAN-13 barcode with EAN-5 add-on | |
| 99 | ||
| 100 | ## Common Applications | |
| 101 | ||
| 102 | 1. Retail Products | |
| 103 | - Standard retail products | |
| 104 | - Point of sale scanning | |
| 105 | - Inventory management | |
| 106 | 2. Books (ISBN) | |
| 107 | - Prefix: 978 or 979 | |
| 108 | - Used with EAN-5 for price | |
| 109 | 3. Periodicals (ISSN) | |
| 110 | - Prefix: 977 | |
| 111 | - Used with EAN-2 for issue numbers | |
| 112 | 101 | |
| 113 | [!NOTE] Image needed: Real-world application examples | |
| 102 | ## OCR-B Font Support | |
| 114 | 103 | |
| 115 | ## Error Handling | |
| 104 | Standard EAN/UPC barcodes typically use OCR-B font. You can specify this using @font-face: | |
| 116 | 105 | |
| 117 | 106 | ```ts |
| 118 | import { barcode } from '@stacksjs/qrx' | |
| 119 | ||
| 120 | barcode('#barcode', '5901234123457', { | |
| 107 | barcode('#barcode', '123456789012', { | |
| 121 | 108 | format: 'EAN13', |
| 122 | valid: (valid) => { | |
| 123 | if (!valid) { | |
| 124 | console.error('Invalid EAN-13') | |
| 125 | // Handle invalid input | |
| 126 | } | |
| 127 | } | |
| 109 | font: 'OCRB', | |
| 110 | fontSize: 18, | |
| 111 | textMargin: 0 | |
| 128 | 112 | }) |
| 129 | 113 | ``` |
| 130 | 114 | |
| 131 | ## Best Practices | |
| 115 | [!NOTE] Remember to load the OCR-B font via @font-face before generating the barcode. | |
| 116 | ||
| 117 | ## Common Use Cases | |
| 132 | 118 | |
| 133 | 1. Always validate input length (12-13 digits) | |
| 134 | 2. Use OCR-B font for standard compliance | |
| 135 | 3. Ensure adequate quiet zones | |
| 136 | 4. Test scanner compatibility | |
| 137 | 5. Consider add-on requirements | |
| 119 | 1. Retail Products | |
| 120 | - Product identification | |
| 121 | - Inventory management | |
| 122 | - Point of sale scanning | |
| 123 | 2. ISBN Books | |
| 124 | - EAN-13 format with "978" or "979" prefix | |
| 125 | - Optional EAN-5 add-on for price | |
| 126 | 3. Magazines & Periodicals | |
| 127 | - ISSN numbers in EAN-13 format | |
| 128 | - EAN-2 add-on for issue numbers | |
| 129 | ||
| 130 | ## Detailed Format Documentation | |
| 131 | ||
| 132 | For detailed information about specific formats, see: | |
| 133 | ||
| 134 | - [EAN-13](/api/barcode/EAN/EAN-13) - 13-digit format, most common worldwide | |
| 135 | - [EAN-8](/api/barcode/EAN/EAN-8) - 8-digit format for smaller packages | |
| 136 | - [EAN-5](/api/barcode/EAN/EAN-5) - 5-digit supplemental barcode | |
| 137 | - [EAN-2](/api/barcode/EAN/EAN-2) - 2-digit supplemental barcode | |
| 138 | - [UPC-A](/api/barcode/EAN/UPC-A) - 12-digit format, common in North America | |
| 139 | - [UPC-E](/api/barcode/EAN/UPC-E) - Compressed 8-digit format | |
| 140 | ||
| 141 | ## Technical Notes | |
| 142 | ||
| 143 | - All formats include automatic check digit calculation | |
| 144 | - Guard patterns are automatically added _(unless `flat: true`)_ | |
| 145 | - Text alignment and positioning can be customized | |
| 146 | - Support for supplemental EAN-2/EAN-5 add-ons | |
| 147 | - Automatic font sizing based on barcode dimensions | |