Barcode Plugin for Xojo

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


  • Some other types can be generated with the EinhugurBarcodes.Encoder class.

    Object
       BarcodeGenerator

    class BarcodeGenerator

    Constructors

    BarcodeGenerator (console safe) Constructor 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.
    HalfDropDown (console safe)
    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.
    GenerateToPDF (console safe) Generates Barcode from String value into EinhugurPDFWriter.Page object.
    GenerateToPDF (console safe) Generates Barcode from UInt64 value into EinhugurPDFWriter.Page object.
    GenerateToPicture (console safe) Generates Barcode from String value, returning it as Picture object.
    GenerateToPicture (console safe) Generates Barcode from UInt64 value, returning it as Picture object.
    GenerateToSVGString (console safe) Generates Barcode from String value, returning it as String that contains formatting for SVG vector image.
    GenerateToSVGString (console safe) Generates Barcode from UInt64 value, returning it as String that contains formatting for SVG vector image.
    GetPDFBaseSize (console safe) Returns the size of a Barcode with given data, and border settings on a PDF using base size 1.0.

    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 Intel 32 bit
  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS