Platforms to show: All Mac Windows Linux Cross-Platform

Back to ZxingBarcodeMBS module.

ZxingBarcodeMBS.BarcodeFormatFromString(BarcodeFormat as String) as Integer   New in 26.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 26.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a barcode format to integer.
Example
Var f As Integer = ZxingBarcodeMBS.BarcodeFormatFromString("EAN-13")

Break // f = 512

ZxingBarcodeMBS.BarcodeFormatsFromString(BarcodeFormats as String) as Integer()   New in 26.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 26.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts barcode formats to integer.
Example
Var formats() As Integer = ZxingBarcodeMBS.BarcodeFormatsFromString("EAN-8|EAN-13")

Break

ZxingBarcodeMBS.BarcodeFormatsToString(BarcodeFormats() as Integer) as String   New in 26.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 26.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a barcode formats value to text.
Example
Var s As String
Var f() As Integer

f.add ZXingReaderOptionsMBS.BarcodeFormatEAN13
f.add ZXingReaderOptionsMBS.BarcodeFormatEAN8

s = ZxingBarcodeMBS.BarcodeFormatsToString(f)
MessageBox s // EAN-8, EAN-13

ZxingBarcodeMBS.BarcodeFormatToString(BarcodeFormat as Integer) as String   New in 26.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 26.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts one barcode format value to text.
Example
Var s As String
Var f As Integer

f = ZXingReaderOptionsMBS.BarcodeFormatEAN13
s = ZxingBarcodeMBS.BarcodeFormatToString(f)
MessageBox s // EAN-13

ZxingBarcodeMBS.CharacterSetFromString(text as String) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 24.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a text name for a character set to an integer value.
Example
Var f As Integer

f = ZxingBarcodeMBS.CharacterSetFromString("UTF-8")

Break // f = 29

ZxingBarcodeMBS.CharacterSetToString(value as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 24.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a character set value to a text for display.
Example
Var s As String

s = ZxingBarcodeMBS.CharacterSetToString(ZXingReaderOptionsMBS.CharacterSetUTF8)

MessageBox s // UTF-8

ZxingBarcodeMBS.ReadBarcode(Pic as Picture, Options as ZXingReaderOptionsMBS = nil) as ZXingReaderResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 24.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Read barcode from a picture.
Example
Var b As New BarcodeGeneratorMBS
b.Symbology = b.BarcodeQrcode
b.Encode "Hello Xojo Developer!"
Var pic As Picture = b.Picture

Var result As ZXingReaderResultMBS = ZxingBarcodeMBS.ReadBarcode(pic)

MessageBox result.Text

Options: optional ReaderOptions to parameterize / speed up detection.

Some examples using this method:

ZxingBarcodeMBS.ReadBarcodes(Pic as Picture, Options as ZXingReaderOptionsMBS = nil) as ZXingReaderResultMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Barcode MBS Barcode Plugin 24.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Read barcodes from a picture.
Example
// try sequence
Var StructuredAppend As New ZintStructuredAppendMBS
StructuredAppend.ID = "123"
StructuredAppend.Index = 4 // part 4 of 4
StructuredAppend.Count = 4

Var b As New BarcodeGeneratorMBS
b.StructuredAppend = StructuredAppend
b.Symbology = b.BarcodeQrcode
b.Encode "Hello Xojo Developer!"

Var pic As Picture = b.Picture

Var f As FolderItem = SpecialFolder.Desktop.Child("barcode.jpg")
call pic.Save(f, Picture.Formats.JPEG)

Var result As ZXingReaderResultMBS = ZxingBarcodeMBS.ReadBarcode(pic)

MessageBox result.Text+" "+result.sequenceId+" "+_
result.sequenceIndex.ToString+"/"+result.sequenceSize.ToString
// shows 3 of 4 since here it is zero based!

Options: optional ReaderOptions to parameterize / speed up detection.
Returns list of result objects, which can be empty.

The items on this page are in the following plugins: MBS Barcode Plugin.


The biggest plugin in space...