Xojo 2013r1 or later.

BarcodeGenerator Class (console safe)

A class to generate Barcodes. The class can generate Barcodes into Picture objects or return a SVG string that can be saved into SVG file.

The class currently supports generating the following Barcode formats:
  • Code 39
  • Code 93
  • Code 128
  • EAN8
  • EAN13
  • UPC-A
  • UPC-E

    Note we also have iOS module for this class that can generate some of the formats on iOS.

    Object
       BarcodeGenerator

    class BarcodeGenerator

    Constructors

    BarcodeGeneratorConstructor with no parameters.

    Properties

    BackColor (console safe) Sets the background color
    BarWidth (console safe) Sets or gets the desired width of each bar in the Barcode.
    ForeColor (console safe) Sets the color of the bars and text.
    Height (console safe) Sets or gets the desired height of the Barcode.
    HeightRatio (console safe) Sets desired height ratio of the Barcode. This property does nothing if the UseHeightRatio property is false.
    IncludeLeadingAndTralingBrackets (console safe) If set to true then leading and trailing brackets are included if the selected Barcode standard requires them. This property is default set to true.
    LastError (console safe) Returns error code indicating last error that occurred or NO_ERROR if there was no error.
    Padding (console safe) Sets or gets the amount of padding around the Barcode.
    PixelsPerMillimeter (console safe) Sets or gets Pixels per millimetres. (See remarks)
    QuietZoneIncludedInPadding (console safe) Sets or gets if quiet zone required by given Barcode standard should be included in the set padding or added to the quiet zone.
    ScaleFactor (console safe) Sets or gets scale factor of the generated Barcode (for retina and other high Resolution devices).
    UseHeightRatio (console safe) Configures if the HeightRatio property should be used or not.

    Methods

    GenerateEANCheckDigit (console safe) Generates check digit for EAN and UPC barcodes.
    GenerateToPicture (console safe) Generates Barcode from UInt64 value, returning it as Picture object.
    GenerateToPicture (console safe) Generates Barcode from String value, returning it as Picture object.
    GenerateToSVGString (console safe) Generates Barcode from UInt64 value, returning it as String that contains formatting for SVG vector image.
    GenerateToSVGString (console safe) Generates Barcode from String value, returning it as String that contains formatting for SVG vector image.

    Enumerations

    ErrorCodeTypeA enum that represents error codes for the BarcodeGenerator class.
    BarcodeTypeA enum that represents selection of Barcode standards.

    Examples


    EAN13 Barcode


    EAN8 Barcode


    Code128 Barcode


    Code93 Barcode


    Code39 Barcode

    Supported Platforms:

  • MacOS X Carbon
  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM