Barcode Plugin for Xojo

BarcodeGenerator.GenerateToPicture Method

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

GenerateToPicture(
   type as BarcodeType,
   value as UInt64,
   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 UInt64 = 12345678

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

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



Note that for some barcode standards like the Code128 for example then when passing in number instead of string then the Barcode is optimised in different way and gives different and shorter barcode containing same data.

See Also

BarcodeGenerator Class