Class ZXing

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class ZXing
    extends AbstractBarcodeDecoder
    Decodes the data in a barcode using the ZXing library.
    For more information see:
    https://github.com/zxing/zxing



    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -autoDetect <boolean> (property: autoDetect)
        Enable or disable barcode format auto-detection; if disabled, it will attempt 
        to decode using the specified format.
        default: true
     
    -try-harder <boolean> (property: tryHarder)
        If enabled, the detection tries harder to locate barcodes (slower).
        default: false
     
    -format <AZTEC|CODABAR|CODE_39|CODE_93|CODE_128|DATA_MATRIX|EAN_8|EAN_13|ITF|MAXICODE|PDF_417|QR_CODE|RSS_14|RSS_EXPANDED|UPC_A|UPC_E|UPC_EAN_EXTENSION> [-format ...] (property: format)
        Barcode format type to expect.
        default: 
     
    Author:
    lx51 (lx51 at students dot waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • REPORT_PARAM_METADATA_PREFIX

        public static final String REPORT_PARAM_METADATA_PREFIX
        Key name prefix for ZXing result metadata.
        See Also:
        Constant Field Values
      • REPORT_PARAM_FORMAT

        public static final String REPORT_PARAM_FORMAT
        Key name for barcode format in the report.
        See Also:
        Constant Field Values
      • REPORT_PARAM_WIDTH

        public static final String REPORT_PARAM_WIDTH
        Key name for barcode width in report.
        See Also:
        Constant Field Values
      • REPORT_PARAM_HEIGHT

        public static final String REPORT_PARAM_HEIGHT
        Key name for barcode height in report.
        See Also:
        Constant Field Values
      • m_AutoDetect

        protected boolean m_AutoDetect
        Barcode format auto-detection.
      • m_TryHarder

        protected boolean m_TryHarder
        Whether to try harder detecting a barcode.
      • m_Format

        protected com.google.zxing.BarcodeFormat[] m_Format
        Expected barcode format.
    • Constructor Detail

      • ZXing

        public ZXing()
    • Method Detail

      • setAutoDetect

        public void setAutoDetect​(boolean value)
        Enables or disables barcode format auto-detection.
        Parameters:
        value - enable auto-detection?
      • getAutoDetect

        public boolean getAutoDetect()
        Gets whether barcode format auto-detection is enabled.
        Returns:
        enable auto-detection?
      • autoDetectTipText

        public String autoDetectTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setTryHarder

        public void setTryHarder​(boolean value)
        Sets whether to try harder to detect barcodes.
        Parameters:
        value - true if to try harder
      • getTryHarder

        public boolean getTryHarder()
        Returns whether to try harder to find barcodes.
        Returns:
        true if trying harder
      • tryHarderTipText

        public String tryHarderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFormat

        public void setFormat​(com.google.zxing.BarcodeFormat[] value)
        Set barcode format hint.
        Parameters:
        value - barcode format
      • getFormat

        public com.google.zxing.BarcodeFormat[] getFormat()
        Gets the barcode format hint.
        Returns:
        barcode format
      • formatTipText

        public String formatTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.