Class Code128BarcodeElement


public class Code128BarcodeElement extends TextBarcodeElement
Represents a Code 128 barcode element.

This class can be used to place a Code 128 barcode on a page.

  • Constructor Details

    • Code128BarcodeElement

      public Code128BarcodeElement(String value, ElementPlacement placement, float height, float xOffset, float yOffset)
      Initializes a new instance of the Code128BarcodeElement class
      Parameters:
      value - The value of the barcode.
      placement - The placement of the barcode on the page.
      height - The height of the barcode.
      xOffset - The X coordinate of the barcode.
      yOffset - The Y coordinate of the barcode.

      Code sets can be specified along with data, in order to do this ProcessTilde property needs to be set to true. Example value: "~BHello ~AWORLD 1~C2345", where ~A, ~B and ~C representing code sets A, B and C respectively. However if any inline code set has invalid characters it will be shifted to an appropriate code set.

    • Code128BarcodeElement

      public Code128BarcodeElement(String value, ElementPlacement placement, float height)
      Initializes a new instance of the Code128BarcodeElement class
      Parameters:
      value - The value of the barcode.
      placement - The placement of the barcode on the page.
      height - The height of the barcode.
  • Method Details

    • getHeight

      public float getHeight()
      Gets the height of the barcode.
      Returns:
      The height of the barcode.
    • setHeight

      public void setHeight(float value)
      Sets the height of the barcode.
      Parameters:
      value - The height of the barcode.
    • getUccEan128

      public boolean getUccEan128()
      Gets a boolean representing if the barcode is a UCC / EAN Code 128 barcode.

      If true an FNC1 code will be the first character in the barcode.

      Returns:
      A boolean representing if the barcode is a UCC / EAN Code 128 barcode.
    • setUccEan128

      public void setUccEan128(boolean value)
      Sets a boolean representing if the barcode is a UCC / EAN Code 128 barcode.

      If true an FNC1 code will be the first character in the barcode.

      Parameters:
      value - A boolean representing if the barcode is a UCC / EAN Code 128 barcode.
    • getProcessTilde

      public boolean getProcessTilde()
      Gets a boolean indicating whether to process the tilde character.

      If true checks for fnc1 (~1) character in the barcode Value and checks for the inline code sets if present in the data to process. Example value: "~BHello ~AWORLD 1~C2345", where ~A, ~B and ~C representing code sets A, B and C respectively. However if any inline code set has invalid characters it will be shifted to an appropriate code set. "\" is used as an escape character to add ~.

      Returns:
      A boolean indicating whether to process the tilde character.
    • setProcessTilde

      public void setProcessTilde(boolean value)
      Sets a boolean indicating whether to process the tilde character.

      If true checks for fnc1 (~1) character in the barcode Value and checks for the inline code sets if present in the data to process. Example value: "~BHello ~AWORLD 1~C2345", where ~A, ~B and ~C representing code sets A, B and C respectively. However if any inline code set has invalid characters it will be shifted to an appropriate code set.

      Parameters:
      value - A boolean indicating whether to process the tilde character.