zxing-wasm
    Preparing search index...

    Interface WriterOptions

    Writer options for writing barcodes.

    interface WriterOptions {
        ecLevel?: EcLevel;
        forceSquareDataMatrix?: boolean;
        format?: WriteInputBarcodeFormat;
        options?: string;
        readerInit?: boolean;
        rotate?: number;
        scale?: number;
        sizeHint?: number;
        withHRT?: boolean;
        withQuietZones?: boolean;
    }

    Hierarchy

    • Partial<Omit<ZXingWriterOptions, "format">>
      • WriterOptions
    Index

    Properties

    ecLevel?: EcLevel

    The error correction level of the symbol (empty string if not applicable)

    ""

    forceSquareDataMatrix?: boolean

    Force the Data Matrix to be square.

    false

    This option does nothing and will be removed in the next major version, use options instead

    The format of the barcode to write.

    Supported values are: "Aztec", "Codabar", "Code39", "Code93", "Code128", "DataBar", "DataBarExpanded", "DataBarLimited", "DataMatrix", "DXFilmEdge", "EAN-8", "EAN-13", "ITF", "MaxiCode", "MicroQRCode", "PDF417", "QRCode", "rMQRCode", "UPC-A", "UPC-E"

    "QRCode"

    options?: string

    Comma separated list of symbology specific options and flags.

    This string is parsed by the underlying C++ library to extract named parameters. For boolean flags, include the name (e.g., "gs1"). For options with values, use a key=value format (e.g., "version=5"). Multiple options can be combined, separated by commas (e.g., "gs1,version=2").

    Known keys used by CreatorOptions in the C++ backend:

    • gs1: (boolean) Enables GS1 encoding.
    • stacked: (boolean) Generates a stacked version for DataBar / DataBarExpanded.
    • forceSquare: (boolean) Only consider square symbol versions. Supported only for the DataMatrix format.
    • version: (integer) Specifies the version / size of most 2D symbols.
    • dataMask: (integer) Specifies the data mask pattern for QRCode / MicroQRCode.

    The final form of this property is not yet settled and may change without a major version bump.

    ""

    readerInit?: boolean

    Set if this is the reader initialisation / programming symbol.

    false

    rotate?: number

    The rotation of the barcode in degrees. Valid values are 0, 90, 180 and 270.

    0

    scale?: number

    The scale of the barcode. 0 means unset.

    0

    sizeHint?: number

    A size hint to determine the scale of the barcode. 0 means unset.

    This only takes effect if scale is unset.

    0

    withHRT?: boolean

    Include human readable text (HRT) in the barcode.

    false

    withQuietZones?: boolean

    Add compliant quiet zones to the barcode.

    EAN-13, ITF, UPC-A and UPC-E have compliant quiet zones added by default.

    true