Barcode Plugin for Xojo

BarcodeGenerator.GenerateToPicture Method

Generates Barcode from String value, returning it as Picture object.

GenerateToPicture(
   type as BarcodeType,
   value as String,
   printTextBellow as Boolean) as Picture

Parameters

type
The type of Barcode to generate.
value
The value to generate the barcode from.
printTextBellow
True if wanting barcode text label included, else false.

Returns

Picture

Remarks

For barcode standards that have length requirements then zeros will be appended in-front of the number if needed to pad the value to the needed length.


Dim b as BarcodeGenerator = new BarcodeGenerator()
Dim data as String = "123456"

b.QuietZoneIncludedInPadding = true
b.Padding = 10
b.BarWidth = 1
b.IncludeLeadingAndTralingBrackets = true

Image = b.GenerateToPicture(BarcodeGenerator.BarcodeType.Code128, data, true)


See Also

BarcodeGenerator Class