com.aspose.barcode.generation

Class QRProperties

  • java.lang.Object
    • com.aspose.barcode.generation.QRProperties


  • public final class QRProperties
    extends java.lang.Object

    Contains specific configuration properties for QR barcodes.


      This sample shows how to create and save a BarCode image.
      
             BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.QR);
             generator.setCodeText("123ABC456DEF");
             generator.getQR().setErrorLevel(QRErrorLevel.LevelH);
             generator.save("test.png");
            

    • Constructor Summary

      Constructors 
      Constructor and Description
      QRProperties() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getECIEncoding()
      Extended Channel Interpretation Identifiers.
      int getEncodeMode()
      QR symbology type of BarCode's encoding mode.
      int getEncodeType()
      QR / MicroQR selector mode.
      int getErrorLevel()
      Level of Reed-Solomon error correction for QR barcode.
      int getVersion()
      Version of QR Code.
      void setECIEncoding(int value)
      Extended Channel Interpretation Identifiers.
      void setEncodeMode(int value)
      QR symbology type of BarCode's encoding mode.
      void setEncodeType(int value)
      QR / MicroQR selector mode.
      void setErrorLevel(int value)
      Level of Reed-Solomon error correction for QR barcode.
      void setVersion(int value)
      Version of QR Code.
      java.lang.String toString()
      Returns a human-readable string representation of this QRProperties
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QRProperties

        public QRProperties()
    • Method Detail

      • getEncodeMode

        public int getEncodeMode()

        QR symbology type of BarCode's encoding mode. Default mode is Auto.


          This sample shows how to create and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.QR, "1234567890ABCDEF123");
                 generator.getQR().setEncodeMode(QREncodeMode.ECIEncoding);
                 generator.getQR().setECIEncoding(ECIEncodings.Win1250);
                 generator.save("test.png");
                

      • setEncodeMode

        public void setEncodeMode(int value)

        QR symbology type of BarCode's encoding mode. Default mode is Auto.


          This sample shows how to create and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.QR, "1234567890ABCDEF123");
                 generator.getQR().setEncodeMode(QREncodeMode.ECIEncoding);
                 generator.getQR().setECIEncoding(ECIEncodings.Win1250);
                 generator.save("test.png");
                

      • getEncodeType

        public int getEncodeType()

        QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR.


          This sample shows how to encode MicroQR and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.QR);
                 generator.setCodeText("12345TEXT");
                 generator.getQR().setEncodeType(QREncodeType.ForceMicroQR);
                 generator.save("test.png");
                

      • setEncodeType

        public void setEncodeType(int value)

        QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR.


          This sample shows how to encode MicroQR and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.QR);
                 generator.setCodeText("12345TEXT");
                 generator.getQR().setEncodeType(QREncodeType.ForceMicroQR);
                 generator.save("test.png");
                

      • getErrorLevel

        public int getErrorLevel()

        Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.

      • setErrorLevel

        public void setErrorLevel(int value)

        Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.

      • getVersion

        public int getVersion()

        Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr. Default value is QRVersion.Auto.

      • setVersion

        public void setVersion(int value)

        Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr. Default value is QRVersion.Auto.

      • getECIEncoding

        public int getECIEncoding()

        Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Currently, it is used only for QR 2D barcode.

      • setECIEncoding

        public void setECIEncoding(int value)

        Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Currently, it is used only for QR 2D barcode.

      • toString

        public java.lang.String toString()
        Returns a human-readable string representation of this QRProperties
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string that represents this QRProperties