Barcode#

Class representing a barcode object.

Method / Attribute

Short Description

Barcode.putMetadata()

Add metadata to the barcode

Barcode.putAllMetadata()

Add a listing of metadata to the barcode

Barcode.addResultPoints()

Adds result points to the barcode

Barcode.ToString()

Gets the text value or number of bytes as a string from the barcode

Barcode.Text

The text value for the barcode

Barcode.RawBytes

The barcode’s raw bytes

Barcode.ResultPoints

The barcode’s points

Barcode.BarcodeFormat

The barcode’s format

Barcode.BarcodeMetadata

The barcode’s metadata

Barcode.Timestamp

The barcode’s timestamp

Barcode.NumBits

The barcode’s number of bits

Note

See Working with Barcodes for usage examples.

Class API

class Barcode#
Barcode(string text, byte[] rawBytes, int numBits, BarcodePoint[] resultPoints, BarcodeFormat format, long timestamp)#

Creates a Barcode object.

Parameters:
  • text (string) – String value for barcode.

  • rawBytes (byte[]) – Raw bytes value for barcode.

  • numBits (int) – Number of bits for barcode.

  • resultPoints (BarcodePoint[]) – Result pointsfor barcode.

  • format (BarcodeFormat) – BarcodeFormat for barcode.

  • timestamp (long) – Timestamp for barcode.

putMetadata(BarcodeMetadataType type, object value)#

Adds metadata to the barcode

Parameters:
  • type (BarcodeMetadataType) – Type of barcode.

  • value (object) – A key/value object for the meatadata.

putAllMetadata(IDictionary<BarcodeMetadataType, object> metadata)#

Adds metadata from a dictionary listing to the barcode.

Parameters:

metadata (IDictionary) – Dictionary of metadata.

addResultPoints(BarcodePoint[] newPoints)#

Adds result points to a barcode.

Parameters:

newPoints (BarcodePoint[]) – An array of barcode points.

ToString()#

Returns the atring value of the barcode text, or if null then the bytes length.

Return type:

string

Returns:

the string value of the text or the bytes length as a string.

Text#

The text value for the barcode. Get only.

Type:

bool

RawBytes#

The barcode’s raw bytes. Get only.

Type:

byte[]

ResultPoints#

The barcode’s points. Get only.

Type:

BarcodePoint[]

BarcodeFormat#

The barcode’s format. Get only.

Type:

BarcodeFormat

BarcodeMetadata#

The barcode’s metadata. Get only.

Type:

IDictionary

Timestamp#

The barcode’s timestamp. Get only.

Type:

long

NumBits#

The barcode’s number of bits. Get only.

Type:

int

BarcodeFormat#

Barcode formats are available from the BarcodeFormat enumeration:

Barcode type

ALL = 0

AZTEC

BOXES

CODABAR

CODABLOCKF

CODE128

CODE16K

CODE39

CODE39_LINEARREADER

CODE39_EX

CODE39_NOISE1

CODE93

DM

DM_DPM

EAN13

EAN2

EAN5

EAN8

EAN_UPC_OLD

GS1DATABAREXP

GS1DATABAREXPSTACKED

GS1DATABAROMNI

GS1DATABARSTACKED

GS1DATABARSTACKEDOMNI

GS1DATABARLIMITED

HORIZONTALLINES

I2OF5

IM

KIX

LINETABLES

MAXICODE

MICR

MICROPDF

MSI

OMRCIRCLE

OMRCIRCLE_EXT

OMROVAL

OMROVAL_EXT

OMRSQUARE

OMRSQUARE_EXT

OMRSQUARELPATTERN

OMRRECTANGLE

OMRRECTANGLE_EXT

OMRRECTANGLELPATTERNVERT

OMRRECTANGLELPATTERNHORIZ

PATCH

PHARMA

PDF417

POSTCODE

POSTNET

QR

RAWOMR

RM

VERTICALLINES

UPC_A

UPC_E

TRIOPTIC