ruby-zint 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/ruby-zint/extconf.rb +2 -2
  4. data/lib/zint/aus_post.rb +1 -0
  5. data/lib/zint/aus_redirect.rb +1 -0
  6. data/lib/zint/aus_reply.rb +1 -0
  7. data/lib/zint/aus_route.rb +1 -0
  8. data/lib/zint/azrune.rb +1 -0
  9. data/lib/zint/aztec.rb +1 -0
  10. data/lib/zint/barcode.rb +85 -39
  11. data/lib/zint/{bind.rb → bc_412.rb} +3 -2
  12. data/lib/zint/c25iata.rb +1 -0
  13. data/lib/zint/c25ind.rb +1 -0
  14. data/lib/zint/c25inter.rb +1 -0
  15. data/lib/zint/c25logic.rb +1 -0
  16. data/lib/zint/c25matrix.rb +1 -0
  17. data/lib/zint/c25standard.rb +1 -0
  18. data/lib/zint/{dotty_mode.rb → cep_net.rb} +3 -2
  19. data/lib/zint/channel.rb +1 -0
  20. data/lib/zint/codabar.rb +1 -0
  21. data/lib/zint/codablock_f.rb +1 -0
  22. data/lib/zint/code11.rb +1 -0
  23. data/lib/zint/code128.rb +1 -0
  24. data/lib/zint/{noascii.rb → code128ab.rb} +3 -2
  25. data/lib/zint/code128b.rb +2 -4
  26. data/lib/zint/code16k.rb +1 -0
  27. data/lib/zint/code32.rb +1 -0
  28. data/lib/zint/code39.rb +1 -0
  29. data/lib/zint/code49.rb +1 -0
  30. data/lib/zint/code93.rb +1 -0
  31. data/lib/zint/code_one.rb +1 -0
  32. data/lib/zint/constants/capability_flags.rb +14 -11
  33. data/lib/zint/constants/input_data_types.rb +8 -7
  34. data/lib/zint/constants/output_options.rb +14 -11
  35. data/lib/zint/constants/symbologies.rb +13 -6
  36. data/lib/zint/constants/warn_levels.rb +1 -1
  37. data/lib/zint/daft.rb +1 -0
  38. data/lib/zint/data_matrix.rb +1 -0
  39. data/lib/zint/dbarexp.rb +1 -0
  40. data/lib/zint/dbarexpstk.rb +1 -0
  41. data/lib/zint/dbarltd.rb +1 -0
  42. data/lib/zint/dbaromn.rb +1 -0
  43. data/lib/zint/dbaromnstk.rb +1 -0
  44. data/lib/zint/dbarstk.rb +1 -0
  45. data/lib/zint/dependencies.rb +2 -2
  46. data/lib/zint/dot_code.rb +1 -0
  47. data/lib/zint/dpd.rb +1 -0
  48. data/lib/zint/dpident.rb +1 -0
  49. data/lib/zint/dpleit.rb +1 -0
  50. data/lib/zint/ean128.rb +1 -0
  51. data/lib/zint/ean14.rb +1 -0
  52. data/lib/zint/eanx.rb +1 -0
  53. data/lib/zint/eanxchk.rb +1 -0
  54. data/lib/zint/excode39.rb +1 -0
  55. data/lib/zint/fim.rb +1 -0
  56. data/lib/zint/flat.rb +1 -0
  57. data/lib/zint/grid_matrix.rb +1 -0
  58. data/lib/zint/gs1_128.rb +1 -0
  59. data/lib/zint/hanxin.rb +1 -0
  60. data/lib/zint/hibc128.rb +1 -0
  61. data/lib/zint/hibc39.rb +1 -0
  62. data/lib/zint/hibcaztec.rb +1 -0
  63. data/lib/zint/hibcblockf.rb +1 -0
  64. data/lib/zint/hibcdm.rb +1 -0
  65. data/lib/zint/hibcmicpdf.rb +1 -0
  66. data/lib/zint/hibcpdf.rb +1 -0
  67. data/lib/zint/hibcqr.rb +1 -0
  68. data/lib/zint/isbnx.rb +1 -0
  69. data/lib/zint/itf14.rb +1 -0
  70. data/lib/zint/japan_post.rb +1 -0
  71. data/lib/zint/kix.rb +1 -0
  72. data/lib/zint/korea_post.rb +1 -0
  73. data/lib/zint/logmars.rb +1 -0
  74. data/lib/zint/mailmark.rb +1 -0
  75. data/lib/zint/mailmark_2d.rb +8 -0
  76. data/lib/zint/mailmark_4s.rb +8 -0
  77. data/lib/zint/maxi_code.rb +1 -0
  78. data/lib/zint/micro_pdf417.rb +1 -0
  79. data/lib/zint/micro_qr.rb +1 -0
  80. data/lib/zint/msiplessey.rb +1 -0
  81. data/lib/zint/native.rb +1 -1
  82. data/lib/zint/nve18.rb +1 -0
  83. data/lib/zint/one_code.rb +1 -0
  84. data/lib/zint/pdf417.rb +1 -0
  85. data/lib/zint/pdf417comp.rb +1 -0
  86. data/lib/zint/pdf417trunc.rb +1 -0
  87. data/lib/zint/pharma.rb +1 -0
  88. data/lib/zint/pharmatwo.rb +1 -0
  89. data/lib/zint/planet.rb +1 -0
  90. data/lib/zint/plessey.rb +1 -0
  91. data/lib/zint/postnet.rb +1 -0
  92. data/lib/zint/pzn.rb +1 -0
  93. data/lib/zint/qr.rb +1 -0
  94. data/lib/zint/rmqr.rb +1 -0
  95. data/lib/zint/rss14.rb +1 -0
  96. data/lib/zint/rss14stack.rb +1 -0
  97. data/lib/zint/rss14stackomni.rb +1 -0
  98. data/lib/zint/rssexp.rb +1 -0
  99. data/lib/zint/rssexpstack.rb +1 -0
  100. data/lib/zint/rssltd.rb +1 -0
  101. data/lib/zint/structs/structapp.rb +25 -0
  102. data/lib/zint/structs/symbol.rb +38 -35
  103. data/lib/zint/structs/vector_circle.rb +3 -2
  104. data/lib/zint/telepen.rb +1 -0
  105. data/lib/zint/telepennum.rb +1 -0
  106. data/lib/zint/ultra.rb +1 -0
  107. data/lib/zint/upc_a.rb +1 -0
  108. data/lib/zint/upc_a_chk.rb +1 -0
  109. data/lib/zint/upc_e.rb +1 -0
  110. data/lib/zint/upc_e_chk.rb +1 -0
  111. data/lib/zint/upnqr.rb +1 -0
  112. data/lib/zint/{box.rb → upu_s10.rb} +3 -2
  113. data/lib/zint/uspsimail.rb +1 -0
  114. data/lib/zint/version.rb +1 -1
  115. data/lib/zint/vin.rb +1 -0
  116. data/lib/zint.rb +8 -1
  117. data/ports/archives/zint-2.12.0-src.tar.gz +0 -0
  118. metadata +9 -7
  119. data/lib/zint/stdout.rb +0 -7
  120. data/ports/archives/zint-2.10.0-src.tar.gz +0 -0
@@ -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,4 +1,5 @@
1
1
  module Zint
2
+ # DAFT Code
2
3
  class Daft < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DAFT, options: options)
@@ -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
data/lib/zint/dbarexp.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Expanded
2
3
  class DbarExp < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_EXP, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Expanded Stacked
2
3
  class DbarExpstk < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_EXPSTK, options: options)
data/lib/zint/dbarltd.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Limited
2
3
  class DbarLtd < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_LTD, options: options)
data/lib/zint/dbaromn.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Omnidirectional
2
3
  class DbarOmn < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_OMN, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Stacked Omnidirectional
2
3
  class DbarOmnstk < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_OMNSTK, options: options)
data/lib/zint/dbarstk.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # GS1 DataBar Stacked
2
3
  class DbarStk < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DBAR_STK, options: options)
@@ -1,8 +1,8 @@
1
1
  module Zint
2
- ZINT_VERSION = ENV["ZINT_VERSION"] || "2.10.0"
2
+ ZINT_VERSION = ENV["ZINT_VERSION"] || "2.12.0"
3
3
  # ZINT_SOURCE_URI = "file://#{File.join(File.expand_path("../../../", __FILE__))}/ports/archives/zint-#{ZINT_VERSION}-src.tar.gz"
4
4
  ZINT_SOURCE_URI = "https://downloads.sourceforge.net/zint/zint-#{ZINT_VERSION}-src.tar.gz"
5
- ZINT_SOURCE_SHA1 = "e4a8a5ccbc9e1901e4b592ccc80e17184f2ff5e8"
5
+ ZINT_SOURCE_SHA1 = "6e16036d9822895edededd96e65da755ef3fdb69"
6
6
 
7
7
  MINI_PORTILE_VERSION = "~> 2.1"
8
8
  end
data/lib/zint/dot_code.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # DotCode
2
3
  class DotCode < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DOTCODE, options: options)
data/lib/zint/dpd.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # DPD Code
2
3
  class Dpd < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DPD, options: options)
data/lib/zint/dpident.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Deutsche Post Identcode
2
3
  class Dpident < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DPIDENT, options: options)
data/lib/zint/dpleit.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Deutsche Post Leitcode
2
3
  class Dpleit < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_DPLEIT, options: options)
data/lib/zint/ean128.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Ean128 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_EAN128, options: options)
data/lib/zint/ean14.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # EAN-14
2
3
  class Ean14 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_EAN14, options: options)
data/lib/zint/eanx.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # EAN (European Article Number)
2
3
  class Eanx < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_EANX, options: options)
data/lib/zint/eanxchk.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # EAN + Check Digit
2
3
  class EanxChk < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_EANX_CHK, options: options)
data/lib/zint/excode39.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Extended Code 39
2
3
  class Excode39 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_EXCODE39, options: options)
data/lib/zint/fim.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Facing Identification Mark
2
3
  class Fim < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_FIM, options: options)
data/lib/zint/flat.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Flattermarken
2
3
  class Flat < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_FLAT, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Grid Matrix
2
3
  class GridMatrix < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_GRIDMATRIX, options: options)
data/lib/zint/gs1_128.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module Zint
2
2
  # standard:disable Naming/ClassAndModuleCamelCase
3
+ # GS1-128
3
4
  class Gs1_128 < Barcode
4
5
  # standard:enable Naming/ClassAndModuleCamelCase
5
6
  def initialize(value: nil, input_file: nil, options: {})
data/lib/zint/hanxin.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Han Xin (Chinese Sensible) Code
2
3
  class Hanxin < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HANXIN, options: options)
data/lib/zint/hibc128.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC (Health Industry Barcode) Code 128
2
3
  class Hibc128 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_128, options: options)
data/lib/zint/hibc39.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC Code 39
2
3
  class Hibc39 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_39, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC Aztec Code
2
3
  class HibcAztec < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_AZTEC, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC Codablock-F
2
3
  class HibcBlockf < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_BLOCKF, options: options)
data/lib/zint/hibcdm.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC Data Matrix
2
3
  class HibcDm < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_DM, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC MicroPDF417
2
3
  class HibcMicpdf < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_MICPDF, options: options)
data/lib/zint/hibcpdf.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC PDF417
2
3
  class HibcPdf < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_PDF, options: options)
data/lib/zint/hibcqr.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # HIBC QR Code
2
3
  class HibcQr < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_QR, options: options)
data/lib/zint/isbnx.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # ISBN
2
3
  class Isbnx < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_ISBNX, options: options)
data/lib/zint/itf14.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # ITF-14
2
3
  class Itf14 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_ITF14, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Japanese Postal Code
2
3
  class JapanPost < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_JAPANPOST, options: options)
data/lib/zint/kix.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Dutch Post KIX Code
2
3
  class Kix < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_KIX, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Korea Post
2
3
  class KoreaPost < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_KOREAPOST, options: options)
data/lib/zint/logmars.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # LOGMARS
2
3
  class Logmars < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_LOGMARS, options: options)
data/lib/zint/mailmark.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Mailmark < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_MAILMARK, options: options)
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Royal Mail 2D Mailmark (CMDM) (Data Matrix)
3
+ class Mailmark2D < Barcode
4
+ def initialize(value: nil, input_file: nil, options: {})
5
+ super(value: value, input_file: input_file, type: Zint::BARCODE_MAILMARK_2D, options: options)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Royal Mail 4-State Mailmark
3
+ class Mailmark4S < Barcode
4
+ def initialize(value: nil, input_file: nil, options: {})
5
+ super(value: value, input_file: input_file, type: Zint::BARCODE_MAILMARK_4S, options: options)
6
+ end
7
+ end
8
+ end
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # MaxiCode
2
3
  class MaxiCode < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_MAXICODE, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # MicroPDF417
2
3
  class MicroPdf417 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_MICROPDF417, options: options)
data/lib/zint/micro_qr.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Micro QR Code
2
3
  class MicroQr < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_MICROQR, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # MSI Plessey
2
3
  class MsiPlessey < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_MSI_PLESSEY, options: options)
data/lib/zint/native.rb CHANGED
@@ -5,7 +5,7 @@ module Zint
5
5
  root_path = File.expand_path("../../..", __FILE__)
6
6
  prefix = FFI::Platform::LIBPREFIX.empty? ? "lib" : FFI::Platform::LIBPREFIX
7
7
  bundled_dll = File.join(root_path, "lib/#{prefix}zint.#{FFI::Platform::LIBSUFFIX}")
8
- ffi_lib [bundled_dll, "libzint.so.2.10", "libzint", "zint"]
8
+ ffi_lib [bundled_dll, "libzint.so.2.12", "libzint", "zint"]
9
9
 
10
10
  # Error codes (API return values)
11
11
  enum :error_code, [Constants::Warnings::WARNINGS, Constants::Errors::ERRORS].map { |h| h.to_a }.flatten
data/lib/zint/nve18.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # NVE-18 (SSCC-18)
2
3
  class Nve18 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_NVE18, options: options)
data/lib/zint/one_code.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class OneCode < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_ONECODE, options: options)
data/lib/zint/pdf417.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # PDF417
2
3
  class Pdf417 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Compact PDF417 (Truncated PDF417)
2
3
  class Pdf417comp < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417COMP, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Pdf417trunc < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417TRUNC, options: options)
data/lib/zint/pharma.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Pharmacode One-Track
2
3
  class Pharma < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PHARMA, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Pharmacode Two-Track
2
3
  class PharmaTwo < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PHARMA_TWO, options: options)
data/lib/zint/planet.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # USPS PLANET
2
3
  class Planet < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PLANET, options: options)
data/lib/zint/plessey.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # UK Plessey
2
3
  class Plessey < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PLESSEY, options: options)
data/lib/zint/postnet.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # USPS (U.S. Postal Service) POSTNET
2
3
  class Postnet < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_POSTNET, options: options)
data/lib/zint/pzn.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Pharmazentralnummer
2
3
  class Pzn < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_PZN, options: options)
data/lib/zint/qr.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # QR Code
2
3
  class Qr < Barcode
3
4
  # ECC Levels
4
5
  ECC_LEVEL_L = 1
data/lib/zint/rmqr.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Rectangular Micro QR Code (rMQR)
2
3
  class Rmqr < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RMQR, options: options)
data/lib/zint/rss14.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14stack < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14STACK, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14stackOmni < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14STACK_OMNI, options: options)
data/lib/zint/rssexp.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssExp < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_EXP, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssExpstack < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_EXPSTACK, options: options)
data/lib/zint/rssltd.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssLtd < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_LTD, options: options)
@@ -0,0 +1,25 @@
1
+ module Zint
2
+ module Structs
3
+ # Structured Append info - ignored unless `zint_structapp.count` is set to non-zero value
4
+ class Structapp < FFI::Struct
5
+ layout :index, :int, # Position in Structured Append sequence, 1-based. Must be <= `count`
6
+ :count, :int, # Number of symbols in Structured Append sequence. Set >= 2 to add SA Info
7
+ :id, [:char, 32] # Optional ID to distinguish sequence, ASCII, NUL-terminated unless max 32 long
8
+
9
+ # Position in Structured Append sequence, 1-based. Must be <= `count`
10
+ def index
11
+ self[:index]
12
+ end
13
+
14
+ # Number of symbols in Structured Append sequence. Set >= 2 to add SA Info
15
+ def count
16
+ self[:count]
17
+ end
18
+
19
+ # Optional ID to distinguish sequence, ASCII, NUL-terminated unless max 32 long
20
+ def id
21
+ self[:id]
22
+ end
23
+ end
24
+ end
25
+ end