[]
        
(Showing Draft Content)

IEAN13

Interface IEAN13

All Superinterfaces:
IBarcode, IFontOption, ILabelOption

public interface IEAN13 extends IBarcode, IFontOption, ILabelOption
Represents an EAN-13 barcode.

An EAN-13 barcode consists of 12 numeric digits and 1 check digit. This interface provides access to barcode-specific options such as the add-on text and its label position, together with the common barcode, font, and label settings defined by IBarcode, IFontOption, and ILabelOption.

In the example below, cell A1 stores the 12-digit EAN-13 primary code, and "12" passed to the formula is the separate add-on text.


 worksheet.getRange("A1").setValue("123456789012");
 worksheet.getRange("B1").setFormula("=BC_EAN13(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",1,\"bottom\",\"12\",\"bottom\",,\"normal\",\"normal\",\"none\",\"center\",12,11,7,0,0)");
 IEAN13 barcode = (IEAN13) worksheet.getRange("B1").getValue();
 String primaryCode = barcode.getValue();
 String addOn = barcode.getAddOn();
 String addOnLabelPosition = barcode.getAddOnLabelPosition();
 
  • Method Details

    • getAddOn

      String getAddOn()
      Gets the add-on text of the EAN-13 barcode.

      The add-on text is an optional supplemental code associated with the barcode. When present, its length is 2 or 5 characters.

      In the example below, cell A1 provides the 12-digit primary code and "12" passed to the formula is the separate add-on text.

      
       worksheet.getRange("A1").setValue("123456789012");
       worksheet.getRange("B1").setFormula("=BC_EAN13(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",1,\"bottom\",\"12\",\"bottom\",,\"normal\",\"normal\",\"none\",\"center\",12,11,7,0,0)");
       IEAN13 barcode = (IEAN13) worksheet.getRange("B1").getValue();
       String primaryCode = barcode.getValue();
       String addOn = barcode.getAddOn();
       
      Returns:
      The add-on text of the EAN-13 barcode.
    • getAddOnLabelPosition

      String getAddOnLabelPosition()
      Gets the position of the add-on text on the EAN-13 barcode.

      In the example below, cell A1 provides the 12-digit primary code and "12" passed to the formula is the separate add-on text.

      
       worksheet.getRange("A1").setValue("123456789012");
       worksheet.getRange("B1").setFormula("=BC_EAN13(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",1,\"bottom\",\"12\",\"bottom\",,\"normal\",\"normal\",\"none\",\"center\",12,11,7,0,0)");
       IEAN13 barcode = (IEAN13) worksheet.getRange("B1").getValue();
       String primaryCode = barcode.getValue();
       String addOnLabelPosition = barcode.getAddOnLabelPosition();
       
      Returns:
      The position of the add-on text on the EAN-13 barcode.