ruby-zint 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +9 -0
  3. data/README.md +13 -5
  4. data/ext/ruby-zint/extconf.rb +2 -2
  5. data/lib/zint/aus_post.rb +3 -2
  6. data/lib/zint/aus_redirect.rb +3 -2
  7. data/lib/zint/aus_reply.rb +3 -2
  8. data/lib/zint/aus_route.rb +3 -2
  9. data/lib/zint/azrune.rb +3 -2
  10. data/lib/zint/aztec.rb +3 -2
  11. data/lib/zint/barcode.rb +109 -105
  12. data/lib/zint/bc_412.rb +8 -0
  13. data/lib/zint/c25iata.rb +3 -2
  14. data/lib/zint/c25ind.rb +3 -2
  15. data/lib/zint/c25inter.rb +3 -2
  16. data/lib/zint/c25logic.rb +3 -2
  17. data/lib/zint/c25matrix.rb +3 -2
  18. data/lib/zint/c25standard.rb +3 -2
  19. data/lib/zint/cep_net.rb +8 -0
  20. data/lib/zint/channel.rb +3 -2
  21. data/lib/zint/codabar.rb +3 -2
  22. data/lib/zint/codablock_f.rb +3 -2
  23. data/lib/zint/code11.rb +3 -2
  24. data/lib/zint/code128.rb +3 -2
  25. data/lib/zint/code128ab.rb +8 -0
  26. data/lib/zint/code128b.rb +2 -4
  27. data/lib/zint/code16k.rb +3 -2
  28. data/lib/zint/code32.rb +3 -2
  29. data/lib/zint/code39.rb +3 -2
  30. data/lib/zint/code49.rb +3 -2
  31. data/lib/zint/code93.rb +3 -2
  32. data/lib/zint/code_one.rb +3 -2
  33. data/lib/zint/constants/capability_flags.rb +14 -11
  34. data/lib/zint/constants/input_data_types.rb +8 -7
  35. data/lib/zint/constants/output_options.rb +14 -11
  36. data/lib/zint/constants/symbologies.rb +13 -6
  37. data/lib/zint/constants/warn_levels.rb +1 -1
  38. data/lib/zint/daft.rb +3 -2
  39. data/lib/zint/data_matrix.rb +4 -3
  40. data/lib/zint/dbarexp.rb +3 -2
  41. data/lib/zint/dbarexpstk.rb +3 -2
  42. data/lib/zint/dbarltd.rb +3 -2
  43. data/lib/zint/dbaromn.rb +3 -2
  44. data/lib/zint/dbaromnstk.rb +3 -2
  45. data/lib/zint/dbarstk.rb +3 -2
  46. data/lib/zint/dependencies.rb +2 -3
  47. data/lib/zint/dot_code.rb +3 -2
  48. data/lib/zint/dpd.rb +3 -2
  49. data/lib/zint/dpident.rb +3 -2
  50. data/lib/zint/dpleit.rb +3 -2
  51. data/lib/zint/ean128.rb +3 -2
  52. data/lib/zint/ean14.rb +3 -2
  53. data/lib/zint/eanx.rb +3 -2
  54. data/lib/zint/eanxchk.rb +3 -2
  55. data/lib/zint/excode39.rb +3 -2
  56. data/lib/zint/fim.rb +3 -2
  57. data/lib/zint/flat.rb +3 -2
  58. data/lib/zint/grid_matrix.rb +3 -2
  59. data/lib/zint/gs1_128.rb +3 -2
  60. data/lib/zint/hanxin.rb +3 -2
  61. data/lib/zint/hibc128.rb +3 -2
  62. data/lib/zint/hibc39.rb +3 -2
  63. data/lib/zint/hibcaztec.rb +3 -2
  64. data/lib/zint/hibcblockf.rb +3 -2
  65. data/lib/zint/hibcdm.rb +3 -2
  66. data/lib/zint/hibcmicpdf.rb +3 -2
  67. data/lib/zint/hibcpdf.rb +3 -2
  68. data/lib/zint/hibcqr.rb +3 -2
  69. data/lib/zint/isbnx.rb +3 -2
  70. data/lib/zint/itf14.rb +3 -2
  71. data/lib/zint/japan_post.rb +3 -2
  72. data/lib/zint/kix.rb +3 -2
  73. data/lib/zint/korea_post.rb +3 -2
  74. data/lib/zint/logmars.rb +3 -2
  75. data/lib/zint/mailmark.rb +3 -2
  76. data/lib/zint/mailmark_2d.rb +8 -0
  77. data/lib/zint/mailmark_4s.rb +8 -0
  78. data/lib/zint/maxi_code.rb +3 -2
  79. data/lib/zint/micro_pdf417.rb +3 -2
  80. data/lib/zint/micro_qr.rb +3 -2
  81. data/lib/zint/msiplessey.rb +3 -2
  82. data/lib/zint/native.rb +1 -1
  83. data/lib/zint/nve18.rb +3 -2
  84. data/lib/zint/one_code.rb +3 -2
  85. data/lib/zint/pdf417.rb +3 -2
  86. data/lib/zint/pdf417comp.rb +3 -2
  87. data/lib/zint/pdf417trunc.rb +3 -2
  88. data/lib/zint/pharma.rb +3 -2
  89. data/lib/zint/pharmatwo.rb +3 -2
  90. data/lib/zint/planet.rb +3 -2
  91. data/lib/zint/plessey.rb +3 -2
  92. data/lib/zint/postnet.rb +3 -2
  93. data/lib/zint/pzn.rb +3 -2
  94. data/lib/zint/qr.rb +3 -2
  95. data/lib/zint/rmqr.rb +3 -2
  96. data/lib/zint/rss14.rb +3 -2
  97. data/lib/zint/rss14stack.rb +3 -2
  98. data/lib/zint/rss14stackomni.rb +3 -2
  99. data/lib/zint/rssexp.rb +3 -2
  100. data/lib/zint/rssexpstack.rb +3 -2
  101. data/lib/zint/rssltd.rb +3 -2
  102. data/lib/zint/structs/structapp.rb +25 -0
  103. data/lib/zint/structs/symbol.rb +38 -35
  104. data/lib/zint/structs/vector_circle.rb +3 -2
  105. data/lib/zint/telepen.rb +3 -2
  106. data/lib/zint/telepennum.rb +3 -2
  107. data/lib/zint/ultra.rb +3 -2
  108. data/lib/zint/upc_a.rb +3 -2
  109. data/lib/zint/upc_a_chk.rb +3 -2
  110. data/lib/zint/upc_e.rb +3 -2
  111. data/lib/zint/upc_e_chk.rb +3 -2
  112. data/lib/zint/upnqr.rb +3 -2
  113. data/lib/zint/upu_s10.rb +8 -0
  114. data/lib/zint/uspsimail.rb +3 -2
  115. data/lib/zint/version.rb +1 -1
  116. data/lib/zint/vin.rb +3 -2
  117. data/lib/zint.rb +8 -1
  118. data/ports/archives/zint-2.12.0-src.tar.gz +0 -0
  119. metadata +128 -10
  120. data/lib/zint/bind.rb +0 -7
  121. data/lib/zint/box.rb +0 -7
  122. data/lib/zint/dotty_mode.rb +0 -7
  123. data/lib/zint/noascii.rb +0 -7
  124. data/lib/zint/stdout.rb +0 -7
  125. data/ports/archives/zint-2.10.0-src.tar.gz +0 -0
data/lib/zint/c25inter.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # 2 of 5 Interleaved
2
3
  class C25inter < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_C25INTER, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_C25INTER, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/c25logic.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # 2 of 5 Data Logic
2
3
  class C25logic < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_C25LOGIC, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_C25LOGIC, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class C25matrix < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_C25MATRIX, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_C25MATRIX, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # 2 of 5 Standard (Matrix)
2
3
  class C25standard < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_C25STANDARD, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_C25STANDARD, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Brazilian CEPNet Postal Code
3
+ class CepNet < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CEPNET, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/channel.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Channel Code
2
3
  class Channel < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CHANNEL, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CHANNEL, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/codabar.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Codabar
2
3
  class Codabar < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODABAR, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODABAR, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Codablock-F
2
3
  class CodablockF < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODABLOCKF, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODABLOCKF, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code11.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 11
2
3
  class Code11 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE11, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE11, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code128.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 128
2
3
  class Code128 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE128, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE128, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 128 (Suppress Code Set C)
3
+ class Code128AB < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE128AB, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/code128b.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  module Zint
2
- class Code128b < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE128B, options: options)
5
- end
2
+ # Legacy
3
+ class Code128B < Code128AB
6
4
  end
7
5
  end
data/lib/zint/code16k.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 16k
2
3
  class Code16k < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE16K, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE16K, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code32.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 32
2
3
  class Code32 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE32, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE32, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code39.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 39
2
3
  class Code39 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE39, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE39, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code49.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 49
2
3
  class Code49 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE49, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE49, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code93.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code 93
2
3
  class Code93 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODE93, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE93, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/code_one.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Code One
2
3
  class CodeOne < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_CODEONE, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODEONE, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -2,17 +2,20 @@ module Zint
2
2
  module Constants
3
3
  # Capability flags (ZBarcode_Cap() `cap_flag`)
4
4
  module CapabilityFlags
5
- ZINT_CAP_HRT = 0x0001 # Prints Human Readable Text?
6
- ZINT_CAP_STACKABLE = 0x0002 # Is stackable?
7
- ZINT_CAP_EXTENDABLE = 0x0004 # Is extendable with add-on data? (Is UPC/EAN?)
8
- ZINT_CAP_COMPOSITE = 0x0008 # Can have composite data?
9
- ZINT_CAP_ECI = 0x0010 # Supports Extended Channel Interpretations?
10
- ZINT_CAP_GS1 = 0x0020 # Supports GS1 data?
11
- ZINT_CAP_DOTTY = 0x0040 # Can be output as dots?
12
- ZINT_CAP_FIXED_RATIO = 0x0100 # Has fixed width-to-height (aspect) ratio?
13
- ZINT_CAP_READER_INIT = 0x0200 # Supports Reader Initialisation?
14
- ZINT_CAP_FULL_MULTIBYTE = 0x0400 # Supports full-multibyte option?
15
- ZINT_CAP_MASK = 0x0800 # Is mask selectable?
5
+ ZINT_CAP_HRT = 0x0001 # Prints Human Readable Text? */
6
+ ZINT_CAP_STACKABLE = 0x0002 # Is stackable? */
7
+ ZINT_CAP_EXTENDABLE = 0x0004 # Is extendable with add-on data? (Is EAN/UPC?) */
8
+ ZINT_CAP_COMPOSITE = 0x0008 # Can have composite data? */
9
+ ZINT_CAP_ECI = 0x0010 # Supports Extended Channel Interpretations? */
10
+ ZINT_CAP_GS1 = 0x0020 # Supports GS1 data? */
11
+ ZINT_CAP_DOTTY = 0x0040 # Can be output as dots? */
12
+ ZINT_CAP_QUIET_ZONES = 0x0080 # Has default quiet zones? */
13
+ ZINT_CAP_FIXED_RATIO = 0x0100 # Has fixed width-to-height (aspect) ratio? */
14
+ ZINT_CAP_READER_INIT = 0x0200 # Supports Reader Initialisation? */
15
+ ZINT_CAP_FULL_MULTIBYTE = 0x0400 # Supports full-multibyte option? */
16
+ ZINT_CAP_MASK = 0x0800 # Is mask selectable? */
17
+ ZINT_CAP_STRUCTAPP = 0x1000 # Supports Structured Append? */
18
+ ZINT_CAP_COMPLIANT_HEIGHT = 0x2000 # Has compliant height? */
16
19
  end
17
20
  end
18
21
  end
@@ -2,13 +2,14 @@ module Zint
2
2
  module Constants
3
3
  # Input data types (`symbol->input_mode`)
4
4
  module InputDataTypes
5
- DATA_MODE = 0
6
- UNICODE_MODE = 1
7
- GS1_MODE = 2
8
- # The following may be OR-ed with above
9
- ESCAPE_MODE = 8
10
- GS1PARENS_MODE = 16
11
- GS1NOCHECK_MODE = 32
5
+ DATA_MODE = 0 # Binary
6
+ UNICODE_MODE = 1 # UTF-8
7
+ GS1_MODE = 2 # GS1
8
+ ESCAPE_MODE = 0x0008 # Process escape sequences
9
+ GS1PARENS_MODE = 0x0010 # Process parentheses as GS1 AI delimiters (instead of square brackets)
10
+ GS1NOCHECK_MODE = 0x0020 # Do not check validity of GS1 data (except that printable ASCII only)
11
+ HEIGHTPERROW_MODE = 0x0040 # Interpret `height` as per-row rather than as overall height
12
+ FAST_MODE = 0x0080 # Use faster if less optimal encodation or other shortcuts if available (affects DATAMATRIX, MICROPDF417, PDF417, QRCODE & UPNQR only)
12
13
  end
13
14
  end
14
15
  end
@@ -2,17 +2,20 @@ module Zint
2
2
  module Constants
3
3
  # Output options (`symbol->output_options`)
4
4
  module OutputOptions
5
- BARCODE_NO_ASCII = 1 # Legacy (no-op)
6
- BARCODE_BIND = 2 # Boundary bars above & below the symbol and between stacked symbols
7
- BARCODE_BOX = 4 # Box around symbol
8
- BARCODE_STDOUT = 8 # Output to stdout
9
- READER_INIT = 16 # Reader Initialisation (Programming)
10
- SMALL_TEXT = 32 # Use smaller font
11
- BOLD_TEXT = 64 # Use bold font
12
- CMYK_COLOUR = 128 # CMYK colour space (Encapsulated PostScript and TIF)
13
- BARCODE_DOTTY_MODE = 256 # Plot a matrix symbol using dots rather than squares
14
- GS1_GS_SEPARATOR = 512 # Use GS instead of FNC1 as GS1 separator (Data Matrix)
15
- OUT_BUFFER_INTERMEDIATE = 1024 # Return ASCII values in bitmap buffer (OUT_BUFFER only)
5
+ BARCODE_BIND_TOP = 0x0001 # Boundary bar above the symbol only (not below), does not affect stacking */
6
+ BARCODE_BIND = 0x0002 # Boundary bars above & below the symbol and between stacked symbols */
7
+ BARCODE_BOX = 0x0004 # Box around symbol */
8
+ BARCODE_STDOUT = 0x0008 # Output to stdout */
9
+ READER_INIT = 0x0010 # Reader Initialisation (Programming) */
10
+ SMALL_TEXT = 0x0020 # Use smaller font */
11
+ BOLD_TEXT = 0x0040 # Use bold font */
12
+ CMYK_COLOUR = 0x0080 # CMYK colour space (Encapsulated PostScript and TIF) */
13
+ BARCODE_DOTTY_MODE = 0x0100 # Plot a matrix symbol using dots rather than squares */
14
+ GS1_GS_SEPARATOR = 0x0200 # Use GS instead of FNC1 as GS1 separator (Data Matrix) */
15
+ OUT_BUFFER_INTERMEDIATE = 0x0400 # Return ASCII values in bitmap buffer (OUT_BUFFER only) */
16
+ BARCODE_QUIET_ZONES = 0x0800 # Add compliant quiet zones (additional to any specified whitespace); Note: CODE16K, CODE49, CODABLOCKF, ITF14, EAN/UPC have default quiet zones */
17
+ BARCODE_NO_QUIET_ZONES = 0x1000 # Disable quiet zones, notably those with defaults as listed above */
18
+ COMPLIANT_HEIGHT = 0x2000 # Warn if height not compliant and use standard height (if any) as default */
16
19
  end
17
20
  end
18
21
  end
@@ -35,25 +35,27 @@ module Zint
35
35
  BARCODE_UPCA_CHK = 35 # UPC-A + Check Digit
36
36
  BARCODE_UPCE = 37 # UPC-E
37
37
  BARCODE_UPCE_CHK = 38 # UPC-E + Check Digit
38
- BARCODE_POSTNET = 40 # USPS POSTNET
38
+ BARCODE_POSTNET = 40 # USPS (U.S. Postal Service) POSTNET
39
39
  BARCODE_MSI_PLESSEY = 47 # MSI Plessey
40
40
  BARCODE_FIM = 49 # Facing Identification Mark
41
41
  BARCODE_LOGMARS = 50 # LOGMARS
42
42
  BARCODE_PHARMA = 51 # Pharmacode One-Track
43
43
  BARCODE_PZN = 52 # Pharmazentralnummer
44
44
  BARCODE_PHARMA_TWO = 53 # Pharmacode Two-Track
45
+ BARCODE_CEPNET = 54 # Brazilian CEPNet Postal Code
45
46
  BARCODE_PDF417 = 55 # PDF417
46
47
  BARCODE_PDF417COMP = 56 # Compact PDF417 (Truncated PDF417)
47
48
  BARCODE_PDF417TRUNC = 56 # Legacy
48
49
  BARCODE_MAXICODE = 57 # MaxiCode
49
50
  BARCODE_QRCODE = 58 # QR Code
50
- BARCODE_CODE128B = 60 # Code 128 (Subset B)
51
+ BARCODE_CODE128AB = 60 # Code 128 (Suppress subset C)
52
+ BARCODE_CODE128B = 60 # Legacy
51
53
  BARCODE_AUSPOST = 63 # Australia Post Standard Customer
52
54
  BARCODE_AUSREPLY = 66 # Australia Post Reply Paid
53
55
  BARCODE_AUSROUTE = 67 # Australia Post Routing
54
56
  BARCODE_AUSREDIRECT = 68 # Australia Post Redirection
55
57
  BARCODE_ISBNX = 69 # ISBN
56
- BARCODE_RM4SCC = 70 # Royal Mail 4 State
58
+ BARCODE_RM4SCC = 70 # Royal Mail 4-State Customer Code
57
59
  BARCODE_DATAMATRIX = 71 # Data Matrix (ECC200)
58
60
  BARCODE_EAN14 = 72 # EAN-14
59
61
  BARCODE_VIN = 73 # Vehicle Identification Number
@@ -71,7 +73,7 @@ module Zint
71
73
  BARCODE_MICROPDF417 = 84 # MicroPDF417
72
74
  BARCODE_USPS_IMAIL = 85 # USPS Intelligent Mail (OneCode)
73
75
  BARCODE_ONECODE = 85 # Legacy
74
- BARCODE_PLESSEY = 86 # Plessey Code
76
+ BARCODE_PLESSEY = 86 # UK Plessey
75
77
 
76
78
  # Tbarcode 8 codes
77
79
  BARCODE_TELEPEN_NUM = 87 # Telepen Numeric
@@ -83,7 +85,7 @@ module Zint
83
85
  BARCODE_MICROQR = 97 # Micro QR Code
84
86
 
85
87
  # Tbarcode 9 codes
86
- BARCODE_HIBC_128 = 98 # HIBC Code 128
88
+ BARCODE_HIBC_128 = 98 # HIBC (Health Industry Barcode) Code 128
87
89
  BARCODE_HIBC_39 = 99 # HIBC Code 39
88
90
  BARCODE_HIBC_DM = 102 # HIBC Data Matrix
89
91
  BARCODE_HIBC_QR = 104 # HIBC QR Code
@@ -97,7 +99,10 @@ module Zint
97
99
  BARCODE_HANXIN = 116 # Han Xin (Chinese Sensible) Code
98
100
 
99
101
  # Tbarcode 11 codes
100
- BARCODE_MAILMARK = 121 # Royal Mail 4-state Mailmark
102
+ BARCODE_MAILMARK_2D = 119 # Royal Mail 2D Mailmark (CMDM) (Data Matrix)
103
+ BARCODE_UPU_S10 = 120 # Universal Postal Union S10
104
+ BARCODE_MAILMARK_4S = 121 # Royal Mail 4-State Mailmark
105
+ BARCODE_MAILMARK = 121 # Legacy
101
106
 
102
107
  # Zint specific
103
108
  BARCODE_AZRUNE = 128 # Aztec Runes
@@ -125,6 +130,8 @@ module Zint
125
130
  BARCODE_UPNQR = 143 # UPNQR (Univerzalnega Plačilnega Naloga QR)
126
131
  BARCODE_ULTRA = 144 # Ultracode
127
132
  BARCODE_RMQR = 145 # Rectangular Micro QR Code (rMQR)
133
+ BARCODE_BC412 = 146 # IBM BC412 (SEMI T1-95)
134
+ BARCODE_LAST = 146 # Max barcode number marker, not barcode
128
135
  end
129
136
  end
130
137
  end
@@ -1,6 +1,6 @@
1
1
  module Zint
2
2
  module Constants
3
- # Warning warn (`symbol->warn_level`)
3
+ # Warning level (`symbol->warn_level`)
4
4
  module WarnLevels
5
5
  WARN_DEFAULT = 0 # Default behaviour
6
6
  WARN_FAIL_ALL = 2 # Treat warning as error
data/lib/zint/daft.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # DAFT Code
2
3
  class Daft < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DAFT, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DAFT, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Data Matrix (ECC200)
2
3
  class DataMatrix < Barcode
3
4
  # Options
4
5
  DM_NULL = 0
@@ -9,10 +10,10 @@ module Zint
9
10
  DM_EDIFACT = 5
10
11
  DM_BASE256 = 6
11
12
 
12
- def initialize(value: nil, input_file: nil, type: Zint::BARCODE_DATAMATRIX, options: {})
13
- raise ArgumentError, "Invalid type for DataMatrix code" unless [Zint::BARCODE_DATAMATRIX, Zint::BARCODE_HIBC_DM].include?(type)
13
+ def initialize(value: nil, input_file: nil, type: Zint::BARCODE_DATAMATRIX, symbology: type, **kwargs)
14
+ raise ArgumentError, "Invalid symbology for DataMatrix code" unless [Zint::BARCODE_DATAMATRIX, Zint::BARCODE_HIBC_DM].include?(symbology)
14
15
 
15
- super(value: value, input_file: input_file, type: type, options: {option_3: Zint::DM_SQUARE}.merge(options))
16
+ super(value: value, input_file: input_file, symbology: symbology, option_3: Zint::DM_SQUARE, **kwargs)
16
17
  end
17
18
  end
18
19
  end
data/lib/zint/dbarexp.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Expanded
2
3
  class DbarExp < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_EXP, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_EXP, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Expanded Stacked
2
3
  class DbarExpstk < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_EXPSTK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_EXPSTK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dbarltd.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Limited
2
3
  class DbarLtd < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_LTD, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_LTD, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dbaromn.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Omnidirectional
2
3
  class DbarOmn < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_OMN, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_OMN, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Stacked Omnidirectional
2
3
  class DbarOmnstk < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_OMNSTK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_OMNSTK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dbarstk.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # GS1 DataBar Stacked
2
3
  class DbarStk < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_STK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_STK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,8 +1,7 @@
1
1
  module Zint
2
- ZINT_VERSION = ENV["ZINT_VERSION"] || "2.10.0"
3
- # ZINT_SOURCE_URI = "file://#{File.join(File.expand_path("../../../", __FILE__))}/ports/archives/zint-#{ZINT_VERSION}-src.tar.gz"
2
+ ZINT_VERSION = ENV["ZINT_VERSION"] || "2.12.0"
4
3
  ZINT_SOURCE_URI = "https://downloads.sourceforge.net/zint/zint-#{ZINT_VERSION}-src.tar.gz"
5
- ZINT_SOURCE_SHA1 = "e4a8a5ccbc9e1901e4b592ccc80e17184f2ff5e8"
4
+ ZINT_SOURCE_SHA1 = "6e16036d9822895edededd96e65da755ef3fdb69"
6
5
 
7
6
  MINI_PORTILE_VERSION = "~> 2.1"
8
7
  end
data/lib/zint/dot_code.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # DotCode
2
3
  class DotCode < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DOTCODE, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DOTCODE, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dpd.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # DPD Code
2
3
  class Dpd < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DPD, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPD, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dpident.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Deutsche Post Identcode
2
3
  class Dpident < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DPIDENT, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPIDENT, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/dpleit.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Deutsche Post Leitcode
2
3
  class Dpleit < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DPLEIT, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPLEIT, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/ean128.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Ean128 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_EAN128, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN128, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/ean14.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # EAN-14
2
3
  class Ean14 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_EAN14, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN14, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/eanx.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # EAN (European Article Number)
2
3
  class Eanx < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_EANX, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EANX, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/eanxchk.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # EAN + Check Digit
2
3
  class EanxChk < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_EANX_CHK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EANX_CHK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/excode39.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Extended Code 39
2
3
  class Excode39 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_EXCODE39, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EXCODE39, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/fim.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Facing Identification Mark
2
3
  class Fim < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_FIM, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_FIM, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/flat.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Flattermarken
2
3
  class Flat < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_FLAT, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_FLAT, **kwargs)
5
6
  end
6
7
  end
7
8
  end