# BarcodeSymbology Type

> BarcodeSymbology type alias in the TX Sheet Control TypeScript API for Node.js: Supported native linear barcode formats and QR Code Model 2.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > BarcodeSymbology Type
- **695 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/barcodesymbology/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/barcodesymbology/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/barcodesymbology/llms-full.txt

---

Supported native linear barcode formats and QR Code Model 2.

Package: `@txtextcontrol/tx-sheet-control-server`.

### Syntax

```typescript
type BarcodeSymbology = 'code128' | 'code39' | 'ean13' | 'ean8' | 'upca' | 'upce' | 'itf' | 'codabar' | 'qrCode';
```

### Remarks

Settings are detached snapshots. Cell values and formulas remain available beneath the symbol. Sources resolve after calculation and mail merge. See [Barcodes and QR Codes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/barcodes/llms-full.txt) for validation, supported payloads and XLSX behavior.

### Examples

Create a barcode from application data and retain its editable workbook settings.

```typescript
import { encodeBarcode } from '@txtextcontrol/tx-sheet-control-server';
import type { BarcodeSymbol, BarcodeSymbology } from '@txtextcontrol/tx-sheet-control-server';
import { writeFileSync } from 'node:fs';

const symbology: BarcodeSymbology = 'qrCode';
const symbol: BarcodeSymbol = encodeBarcode({ symbology, value: 'Invoice 1042' });
const size = 4;
const width = (symbol.rows[0].length + 2 * symbol.quietZone) * size;
const height = (symbol.rows.length + 2 * symbol.quietZone) * size;
const modules = symbol.rows.flatMap((row, y) => row.flatMap((dark, x) => dark
    ? [`<rect x="${(x + symbol.quietZone) * size}" y="${(y + symbol.quietZone) * size}" width="${size}" height="${size}"/>`]
    : [])).join('');
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" data-kind="${symbol.isMatrix ? 'matrix' : 'linear'}"><title>${symbol.text}</title><rect width="100%" height="100%" fill="white"/>${modules}</svg>`;
writeFileSync('invoice-label.svg', svg);
```

---

## Nearby

- **Previous:** [BarcodeSymbol.isMatrix Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/barcodesymbol/ismatrix-property/llms-full.txt)
- **Next:** [encodeBarcode Function](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/encodebarcode-function/llms-full.txt)
