Barcode
The barcode method creates editable vector barcodes in Illustrator. It supports QR and matrix codes, retail and logistics symbols, linear formats, GS1 encoding, placement into tagged artwork, color and text styling, and names or tags for generated parts.
Use the Barcode editor in Tools → Methods to choose a format, validate sample data, preview the result, and add the method block to Builder. See the Barcode editor guide for the editor workflow.
How Barcode Placement Works
A barcode can be created in either of two ways:
- Leave the method block's Darty header blank to create the barcode at
xandy, then usescale, rotation, or manual sizing properties as needed. - Put a tag search in the Darty header to use matching artwork as the placement target. The target is replaced by default; set
replacetofalseto preserve it.
tagSearch is also accepted as a property when authoring a sheet manually. In Builder, the tag search is normally represented by the first header row above the barcode method.
Supported Formats
Choose a format that is valid for the supplied data. Format-specific options are ignored or rejected when they do not apply to the chosen symbology.
See Barcode Formats for plain-language descriptions, family and alias distinctions, and guidance on choosing among these formats.
| Format | Format | Format | Format |
|---|---|---|---|
| Aztec | Aztec Code | Aztec Rune | Codabar |
| Code 32 | Code 39 | Code 39 Extended | Code 39 Standard |
| Code 93 | Code 128 | Compact PDF417 | Data Matrix |
| DataBar | DataBar Expanded | DataBar Expanded Stacked | DataBar Limited |
| DataBar Omni | DataBar Stacked | DataBar Stacked Omni | DX Film Edge |
| EAN-2 | EAN-5 | EAN-8 | EAN-13 |
| EAN/UPC | GS1 Digital Link QR | ISBN | ITF |
| ITF-14 | MaxiCode | Micro QR Code | MicroPDF417 |
| PDF417 | Pharmazentralnummer | QR Code | rMQR Code |
| rMQR | UPC-A | UPC-E |
GS1 Digital Link QR, GS1 Digital Link QR Code, GS1 Digital Link, and GS Digital Link QR Code are accepted names for the Digital Link format. Builder currently serializes this format as GS Digital Link QR Code.
Core Encoding Properties
| Property | Description |
|---|---|
format | Barcode symbology. Examples: QR Code, Code 128, EAN-13, Data Matrix, PDF417, GS Digital Link QR Code. |
data | Text or numeric content to encode. The value must satisfy the selected format's rules. Digital Link can use its dedicated fields instead. |
variant | Optional variant supported by the selected generator. |
ecLevel | Error-correction level for QR Code, Micro QR Code, and rMQR. Valid Values: L, M, Q, H. |
creatorOptionsGs1 | Enables GS1 mode where supported. Alias: gs1. Valid Values: true, false. |
bytes | Numeric byte array to encode instead of a text value in supported formats. |
invert | Inverts the generated symbol. Valid Values: true, false. |
addHRT | Controls human-readable text. Valid Values: true, false; omit it to use the format default. |
skip | Skips the method for this data row. See * and Skip. Valid Values: true, false. |
The four QR error-correction levels recover approximately 7%, 15%, 25%, and 30% of damaged codewords respectively. Higher correction makes the symbol denser, so use only as much as the production environment requires.
GS1 Mode
The standard Tools control exposes GS1 mode for Code 128, QR Code, and Data Matrix:
- Code 128 adds the FNC1 control character.
- QR Code uses the GS1 first-position indicator.
- Data Matrix support does not currently guarantee complete GS1 specification compliance; validate the result with the scanner and workflow that will consume it.
GS1 Digital Link QR
Digital Link can be assembled from GS1 fields or supplied as a complete URI.
| Property | Description |
|---|---|
gtin | Required GTIN. Digits only, up to 14 digits. A 13-digit value receives a calculated check digit; a 14-digit value must already have a valid check digit. Alias: gs1DigitalLinkGtin. |
batch | Optional batch or lot value, encoded as GS1 AI 10. Aliases: batchLot, lot. |
serial | Optional serial number, encoded as GS1 AI 21. |
expiryDate | Optional expiration date, encoded as AI 17. Use YYYY-MM-DD in the Tools editor. |
bestBeforeDate | Optional best-before date, encoded as AI 15. Use YYYY-MM-DD in the Tools editor. |
productionDate | Optional production date, encoded as AI 11. Use YYYY-MM-DD in the Tools editor. |
resolverDomain | Resolver origin. Default Value: https://id.gs1.org. Alias: resolver. |
useRawUri | Uses rawUri instead of assembling the link from GS1 fields. Valid Values: true, false. |
rawUri | Complete Digital Link URI used with useRawUri. If the scheme is omitted, Darty adds https://; the final value must be a valid URL. |
Batch and serial identifiers are written as path segments. Date identifiers are written as Digital Link query parameters using GS1's YYMMDD representation.
Placement and Sizing
| Property | Description |
|---|---|
tagSearch | Finds target artwork for barcode placement. Builder normally writes this in the Darty header. |
replace | Replaces tagged target artwork. Default Value: true; use false to keep the target. |
fitToTargetBounds | Fits the barcode to the bounds of tagged target artwork. Valid Values: true, false. |
scale | Scale used when the barcode is created without a tagged target. |
moduleSize | Size of one matrix module. |
barWidth | Base bar width for supported linear formats. |
xDimension | X-dimension for formats that define sizing with it. |
width | Requested overall width. |
height | Requested overall height. |
size | Requested square size for supported matrix formats. |
barHeight | Bar height for supported linear formats. |
unit | Unit for placement and sizing values. Valid Values: pt, mm, cm, in. |
quietZoneModules | Quiet zone on all sides, measured in modules. |
quietZoneXModules | Horizontal quiet zone, measured in modules. |
quietZoneYModules | Vertical quiet zone, measured in modules. |
autoRotate | Allows Darty to rotate the symbol to better fit its target. Valid Values: true, false. |
rotation | Rotation in degrees. Aliases: rotationDegrees, angle. |
x | Horizontal document position when no tagged target is supplied. |
y | Vertical document position when no tagged target is supplied. |
Builder's current Barcode preview writes the common placement fields—target, replace, scale, quiet zone, rotation, x, and y. The method also accepts the manual sizing properties above, but some of them are not yet emitted by every Tools sizing control. Add those columns directly when you need an accepted property that is missing from the preview.
Colors and Overprint
Barcode modules and the optional background are independent colors. Each can use a general color value, swatch, or explicit color-model channels.
| Property pattern | Description |
|---|---|
moduleColor | General module or foreground color. The aliases beginning with foregroundColor are also accepted. |
moduleColorModel | Module color model. Valid Values: none, swatch, color, cmyk, rgb, gray, lab, hsb, hsv, hsl. |
moduleColorName | Swatch name when moduleColorModel is swatch. |
moduleColorR / G / B | RGB channels. Long aliases such as moduleColorRed are accepted. |
moduleColorC / M / Y / K | CMYK channels. Long channel-name aliases are accepted. |
moduleColorGray | Gray channel. |
moduleColorL / A / B | Lab channels. |
moduleColorH / S / V | HSB, HSV, or HSL channels according to moduleColorModel. |
backgroundColor | General background color. |
backgroundColorModel | Background model; accepts the same models as moduleColorModel. |
backgroundColorName | Background swatch name. |
backgroundColorR / G / B | RGB background channels. Equivalent CMYK, Gray, Lab, HSB, HSV, and HSL channel properties are also accepted. |
overprint | Applies overprint to supported generated artwork. Valid Values: true, false. |
Use adequate contrast and preserve the quiet zone. Always test final artwork after color conversion, scaling, rasterization, or printing; a valid vector preview does not guarantee that every production scanner can read the result.
Human-Readable Text
Linear barcode formats can include human-readable text below the symbol.
| Property | Description |
|---|---|
addHRT | true forces text, false removes it, and an omitted value uses the symbology default. |
fontSize | Text size. Alias: textSize. |
textUnit | Unit for fontSize. Valid Values: pt, mm, cm, in. |
font | Font or PostScript name. Aliases: fontName, fontFamily, family, postscriptName. |
gap | Space between the symbol and text. Aliases: textGap, distance. |
gapUnit | Unit for gap. Alias: distanceUnit. |
fitBarcodeWidth | Fits the text across the barcode width. Valid Values: true, false. |
tracking | Character tracking. |
horizontalScale | Horizontal text scale. |
Naming and Tagging Generated Parts
Darty can assign Illustrator names and tags to the complete symbol and to format-specific parts. Finder and data parts are primarily useful for matrix formats, while the text part is relevant only when human-readable text exists.
| Part | Name property | Tags property |
|---|---|---|
| Complete symbol | symbolName | symbolTags |
| Human-readable text | textName | textTags |
| Finder patterns | finderName | finderTags |
| Data marks | dataName | dataTags |
| Background | backgroundName | backgroundTags |
Tag values may be supplied as arrays or list-style spreadsheet values according to the normal Darty array syntax.
Advanced Format Options
The following accepted properties are format-specific and are most often added manually. A generator may ignore or reject a property that does not belong to its format.
| Property | Typical purpose |
|---|---|
eci | Extended Channel Interpretation assignment. |
readerInit | Reader-initialization mode where supported. |
forceSquare | Forces a square form for a supporting matrix format. |
columns and rows | Requested dimensions for stacked formats such as PDF417 variants. |
version | Explicit symbol version for supporting QR-family formats. |
dataMask | Explicit data mask where supported. |
guardDescent | Guard-bar descent for supporting retail formats. |
compliantHeight | Uses the generator's compliant-height behavior. Valid Values: true, false. |
heightPerRow | Row height for a supporting stacked format. |
creatorOptions | Advanced generator options object for programmatic use. |
dryRun | Runs supported barcode processing without committing normal artwork output. Valid Values: true, false. |
Many advanced properties also accept a creatorOptions prefix, such as creatorOptionsEci, creatorOptionsColumns, and creatorOptionsVersion.
Sample Spreadsheets
QR Code at a Document Position
| * | |||||||||
| barcode | |||||||||
| format | data | ecLevel | scale | x | y | moduleColorModel | moduleColorR | moduleColorG | moduleColorB |
| Format | Content | Correction | Scale | X | Y | Color model | Red | Green | Blue |
| QR Code | https://darty.ai | M | 4 | 72pt | 72pt | rgb | 30 | 30 | 30 |
Code 128 in Tagged Artwork
The first matching object tagged product-code is the placement target. replace: false preserves that object.
| product-code | |||||
| barcode | |||||
| format | data | creatorOptionsGs1 | addHRT | replace | symbolName |
| Format | Content | GS1 | Show text | Keep target | Illustrator name |
| Code 128 | 0109501101530003 | true | true | false | Product Barcode |
GS1 Digital Link QR
| package-qr | ||||||
| barcode | ||||||
| format | gtin | batch | serial | expiryDate | resolverDomain | ecLevel |
| Format | GTIN | Batch | Serial | Expiration | Resolver | Correction |
| GS Digital Link QR Code | 09501101530003 | LOT-204 | SN-1832 | 2027-12-31 | https://id.gs1.org | H |
Raw Digital Link URI
| * | |||
| barcode | |||
| format | useRawUri | rawUri | quietZoneModules |
| Format | Use complete URI | URI | Quiet zone |
| GS Digital Link QR Code | true | https://id.gs1.org/01/09501101530003/21/SN-1832 | 4 |
Validation and Troubleshooting
- Confirm that the data is valid for the selected symbology. Retail formats require specific lengths and check digits.
- For Digital Link, verify the GTIN check digit and use a valid resolver or raw URL.
- Do not crop the quiet zone or stretch a symbol non-proportionally after generation.
- Use
addHRT: falseif text is not appropriate for the selected format; not every symbol supports human-readable text. - Format-specific properties should only be supplied to formats that support them.
- Test the final exported or printed result with the intended scanners and production conditions.