Class Version

java.lang.Object
com.itextpdf.text.pdf.qrcode.Version

public final class Version extends Object
See ISO 18004:2006 Annex D
Since:
5.0.2
  • Field Details

    • VERSION_DECODE_INFO

      private static final int[] VERSION_DECODE_INFO
      See ISO 18004:2006 Annex D. Element i represents the raw version bits that specify version i + 7
    • VERSIONS

      private static final Version[] VERSIONS
    • versionNumber

      private final int versionNumber
    • alignmentPatternCenters

      private final int[] alignmentPatternCenters
    • ecBlocks

      private final Version.ECBlocks[] ecBlocks
    • totalCodewords

      private final int totalCodewords
  • Constructor Details

  • Method Details

    • getVersionNumber

      public int getVersionNumber()
    • getAlignmentPatternCenters

      public int[] getAlignmentPatternCenters()
    • getTotalCodewords

      public int getTotalCodewords()
    • getDimensionForVersion

      public int getDimensionForVersion()
    • getECBlocksForLevel

      public Version.ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel)
    • getProvisionalVersionForDimension

      public static Version getProvisionalVersionForDimension(int dimension)

      Deduces version information purely from QR Code dimensions.

      Parameters:
      dimension - dimension in modules
      Returns:
      Version for a QR Code of that dimension
    • getVersionForNumber

      public static Version getVersionForNumber(int versionNumber)
    • decodeVersionInformation

      static Version decodeVersionInformation(int versionBits)
    • buildFunctionPattern

      BitMatrix buildFunctionPattern()
      See ISO 18004:2006 Annex E
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • buildVersions

      private static Version[] buildVersions()
      See ISO 18004:2006 6.5.1 Table 9