TX Sheet Control

renderBarcodePNG Function

Function

Returns a data:image/png;base64 URL, including the quiet zone and optional linear caption.

Package: @txtextcontrol/tx-sheet-control.

Syntax

renderBarcodePNG(options: BarcodeOptions, value?: string): string

Example

Use an existing workbook as book.

import { renderBarcodePNG } from '@txtextcontrol/tx-sheet-control';
const result = renderBarcodePNG({ symbology: 'code128' }, 'ORDER-0001');

Remarks

Standalone helpers do not read workbook cells. The value argument supplies the payload; when omitted, the encoder uses options.value or an empty string. Use cell or drawing barcode settings for live source bindings. EAN and UPC check digits are generated or validated. Invalid settings or nonempty payloads throw an error.

See Barcodes and QR Codes for supported payloads, quiet zones and examples.