ruby-zint 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccdb5e197e8d714e8f2d336b7448a1e104a69a5969b2d811ee6b0ef8998e6cac
4
- data.tar.gz: 547681f881a38f9168ac6330f07f300f578e2655eb3241633992e619394239e9
3
+ metadata.gz: 7cbe79d9fd528474b3cffe957b55cf8cb4aec0bdc97cca55314dc675e74f58c3
4
+ data.tar.gz: a99a851ff4cfc42387d58e2d439c2ae01976fe03ad81595ccdc60cd94f0f5a89
5
5
  SHA512:
6
- metadata.gz: 772885463ca263b7a44405a78851961817a04d97b7e2fe2bb7691a5f5b06c0a7c2055bcf5f9dcfc07e1c2b5d235dbf75dcd8a161d5b0d2d2f04629fb4fb603b4
7
- data.tar.gz: 565dcf8defee2948e4a4335e9681111056b7ee81a5dd03134f77cb030425131829964f7e2847813ee8866e61de3210e1796f855ae9c09ad601b623a8609dd9e4
6
+ metadata.gz: 75f8c14c3f4a3ad2f3990fa1c60204264f7120902e2ca31e2a51afc011c5e069d88bd3dcbeb0a8a73757163703c457c0ca49003da7470704afef01fb204585fe
7
+ data.tar.gz: '0689e71889b46f0278886f717ad3966c2a1b215dd6502666637913112fc84abad23f5ae604d0a1b82bcf2c0379d77975bedaa43887d24d2dab6295734abf0b23'
data/README.md CHANGED
@@ -27,7 +27,7 @@ Install the libzint binary with your package manager (e. g. `apt install zint` o
27
27
 
28
28
  Other platforms require building [from source](https://www.zint.org.uk/manual/chapter/2).
29
29
 
30
- **NOTE:** It is assumed that you are using libzint with the version [2.10](https://sourceforge.net/projects/zint/files/zint/2.10.0/).
30
+ **NOTE:** It is assumed that you are using libzint with the version [2.12](https://sourceforge.net/projects/zint/files/zint/2.12.0/).
31
31
 
32
32
  Then install this gem and enforce system libzint:
33
33
 
@@ -45,11 +45,11 @@ def libzint_usable?
45
45
  m = Module.new do
46
46
  extend FFI::Library
47
47
 
48
- ffi_lib(%w[libzint.so.2.10 libzint zint])
48
+ ffi_lib(%w[libzint.so.2.12 libzint zint])
49
49
  attach_function(:ZBarcode_Version, [], :int32)
50
50
  end
51
51
 
52
- (21000...21100) === m.ZBarcode_Version
52
+ (21200...21300) === m.ZBarcode_Version
53
53
  rescue LoadError
54
54
  false
55
55
  end
data/lib/zint/aus_post.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Australia Post 4-State Barcode
2
3
  class AusPost < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AUSPOST, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Australia Post Redirection
2
3
  class AusRedirect < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AUSREDIRECT, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Australia Post Reply Paid
2
3
  class AusReply < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AUSREPLY, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Australia Post Routing
2
3
  class AusRoute < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AUSROUTE, options: options)
data/lib/zint/azrune.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Aztec Runes
2
3
  class Azrune < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AZRUNE, options: options)
data/lib/zint/aztec.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Aztec Code
2
3
  class Aztec < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_AZTEC, options: options)
data/lib/zint/barcode.rb CHANGED
@@ -31,7 +31,9 @@ module Zint
31
31
 
32
32
  # Exports barcode to file
33
33
  #
34
- # @param path [String] Path to export file
34
+ # @param path [String] Path to export file.
35
+ # Contains the name of the file to output a resulting barcode symbol to.
36
+ # Must end in .png, .gif, .bmp, .emf, .eps, .pcx, .svg, .tif or .txt
35
37
  # @param rotate_angle [Integer] Rotate angle in degrees (0, 90, 180, 270)
36
38
  def to_file(path:, rotate_angle: 0)
37
39
  @zint_symbol[:outfile] = path
@@ -124,7 +126,7 @@ module Zint
124
126
  @zint_symbol[:symbology]
125
127
  end
126
128
 
127
- # Sets type of barcode
129
+ # Sets symbol to use (see BARCODE_XXX below)
128
130
  #
129
131
  # @param type [Integer] Type of barcode
130
132
  def symbology=(type)
@@ -138,7 +140,7 @@ module Zint
138
140
  @zint_symbol[:height]
139
141
  end
140
142
 
141
- # Sets height of barcode
143
+ # Sets height in X-dimensions (ignored for fixed-width barcodes)
142
144
  #
143
145
  # @param height [Float] Height of barcode
144
146
  def height=(height)
@@ -147,12 +149,12 @@ module Zint
147
149
  @zint_symbol[:height] = height
148
150
  end
149
151
 
150
- # Gets scale of barcode
152
+ # Gets scale factor of barcode
151
153
  def scale
152
154
  @zint_symbol[:scale]
153
155
  end
154
156
 
155
- # Sets scale of barcode
157
+ # Sets scale factor when printing barcode
156
158
  #
157
159
  # @param scale [Float] Scale of barcode
158
160
  def scale=(scale)
@@ -161,12 +163,12 @@ module Zint
161
163
  @zint_symbol[:scale] = scale
162
164
  end
163
165
 
164
- # Gets whitespace width of barcode
166
+ # Gets width in X-dimensions of whitespace to left & right of barcode
165
167
  def whitespace_width
166
168
  @zint_symbol[:whitespace_width]
167
169
  end
168
170
 
169
- # Sets whitespace width of barcode
171
+ # Sets width in X-dimensions of whitespace to left & right of barcode
170
172
  #
171
173
  # @param whitespace width [Integer] Whitespace width of barcode
172
174
  def whitespace_width=(whitespace_width)
@@ -175,12 +177,12 @@ module Zint
175
177
  @zint_symbol[:whitespace_width] = whitespace_width
176
178
  end
177
179
 
178
- # Gets whitespace height of barcode
180
+ # Gets height in X-dimensions of whitespace above & below the barcode
179
181
  def whitespace_height
180
182
  @zint_symbol[:whitespace_height]
181
183
  end
182
184
 
183
- # Sets whitespace height of barcode
185
+ # Sets height in X-dimensions of whitespace above & below the barcode
184
186
  #
185
187
  # @param whitespace height [Integer] Whitespace height of barcode
186
188
  def whitespace_height=(whitespace_height)
@@ -189,12 +191,12 @@ module Zint
189
191
  @zint_symbol[:whitespace_height] = whitespace_height
190
192
  end
191
193
 
192
- # Gets border width of barcode
194
+ # Gets size of border in X-dimensions
193
195
  def border_width
194
196
  @zint_symbol[:border_width]
195
197
  end
196
198
 
197
- # Sets border width of barcode
199
+ # Sets size of border in X-dimensions
198
200
  #
199
201
  # @param border width [Integer] Border width of barcode
200
202
  def border_width=(border_width)
@@ -208,7 +210,7 @@ module Zint
208
210
  @zint_symbol[:output_options]
209
211
  end
210
212
 
211
- # Sets output options of barcode
213
+ # Set various output parameters (bind, box etc, see below) of barcode
212
214
  #
213
215
  # @param output options [Integer] Output options of barcode
214
216
  def output_options=(output_options)
@@ -219,10 +221,10 @@ module Zint
219
221
 
220
222
  # Gets foreground colour of barcode
221
223
  def fgcolour
222
- @zint_symbol[:fgcolour]
224
+ @zint_symbol[:fgcolour].to_s
223
225
  end
224
226
 
225
- # Sets foreground colour of barcode
227
+ # Sets foreground as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated
226
228
  #
227
229
  # @param fgcolour [String] Foreground colour of barcode
228
230
  def fgcolour=(fgcolour)
@@ -233,10 +235,10 @@ module Zint
233
235
 
234
236
  # Gets background colour of barcode
235
237
  def bgcolour
236
- @zint_symbol[:bgcolour]
238
+ @zint_symbol[:bgcolour].to_s
237
239
  end
238
240
 
239
- # Sets background colour of barcode
241
+ # Sets background as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated
240
242
  #
241
243
  # @param bgcolour [String] Background color of barcode
242
244
  def bgcolour=(bgcolour)
@@ -245,9 +247,11 @@ module Zint
245
247
  @zint_symbol[:bgcolour] = bgcolour
246
248
  end
247
249
 
248
- # Gets outfile of barcode
250
+ # Contains the name of the file to output a resulting barcode symbol to.
251
+ #
252
+ # Must end in .png, .gif, .bmp, .emf, .eps, .pcx, .svg, .tif or .txt
249
253
  def outfile
250
- @zint_symbol[:outfile]
254
+ @zint_symbol[:outfile].to_s
251
255
  end
252
256
 
253
257
  # Gets option 1 of barcode
@@ -255,7 +259,7 @@ module Zint
255
259
  @zint_symbol[:option_1]
256
260
  end
257
261
 
258
- # Sets option 1 of barcode
262
+ # Sets option 1 (symbol-specific options (see "../docs/manual.txt"))
259
263
  #
260
264
  # @param option_1 [Integer] Option 1 of barcode
261
265
  def option_1=(option_1)
@@ -269,7 +273,7 @@ module Zint
269
273
  @zint_symbol[:option_2]
270
274
  end
271
275
 
272
- # Sets option 2 of barcode
276
+ # Sets option 2 (symbol-specific options) of barcode
273
277
  #
274
278
  # @param option 2 [Integer] Option 2 of barcode
275
279
  def option_2=(option_2)
@@ -283,7 +287,7 @@ module Zint
283
287
  @zint_symbol[:option_3]
284
288
  end
285
289
 
286
- # Sets option 3 of barcode
290
+ # Sets option 3 (symbol-specific options) of barcode
287
291
  #
288
292
  # @param option 3 [Integer] Option 3 of barcode
289
293
  def option_3=(option_3)
@@ -298,7 +302,7 @@ module Zint
298
302
  end
299
303
 
300
304
  # Sets show_hrt of barcode
301
- # Set to 0 to hide text.
305
+ # show = 1 or hide = 0 Human Readable Text. Default is show (1)
302
306
  #
303
307
  # @param show_hrt [Integer] show_hrt of barcode
304
308
  def show_hrt=(show_hrt)
@@ -312,7 +316,7 @@ module Zint
312
316
  @zint_symbol[:fontsize]
313
317
  end
314
318
 
315
- # Sets font size of barcode
319
+ # Sets font size of barcode (Unused)
316
320
  #
317
321
  # @param font size [Integer] Font size of barcode
318
322
  def fontsize=(fontsize)
@@ -326,7 +330,7 @@ module Zint
326
330
  @zint_symbol[:input_mode]
327
331
  end
328
332
 
329
- # Sets input mode of barcode
333
+ # Sets encoding of input data (see DATA_MODE etc below). Default DATA_MODE
330
334
  #
331
335
  # @param input_mode [Integer] Input mode of barcode
332
336
  def input_mode=(input_mode)
@@ -340,7 +344,7 @@ module Zint
340
344
  @zint_symbol[:eci]
341
345
  end
342
346
 
343
- # Sets ECI of barcode
347
+ # Sets extended Channel Interpretation. Default 0 (none)
344
348
  #
345
349
  # @param eci [Integer] ECI of barcode
346
350
  def eci=(eci)
@@ -349,12 +353,54 @@ module Zint
349
353
  @zint_symbol[:eci] = eci
350
354
  end
351
355
 
352
- # Gets text of barcode
356
+ # Gets resolution of output in dots per mm (BMP/EMF/PCX/PNG/TIF only). Default 0 (none)
357
+ def dpmm
358
+ @zint_symbol[:dpmm]
359
+ end
360
+
361
+ # Sets resolution of output in dots per mm (BMP/EMF/PCX/PNG/TIF only). Default 0 (none)
362
+ #
363
+ # @param text [Float] Text of barcode
364
+ def dpmm=(dpmm)
365
+ reset_symbol
366
+
367
+ @zint_symbol[:dpmm] = dpmm
368
+ end
369
+
370
+ # Gets height in X-dimensions that EAN/UPC guard bars descend. Default 5
371
+ def guard_descent
372
+ @zint_symbol[:guard_descent]
373
+ end
374
+
375
+ # Sets height in X-dimensions that EAN/UPC guard bars descend. Default 5
376
+ #
377
+ # @param text [Float] Text of barcode
378
+ def guard_descent=(guard_descent)
379
+ reset_symbol
380
+
381
+ @zint_symbol[:guard_descent] = guard_descent
382
+ end
383
+
384
+ # Gets structured append info. Default structapp.count 0 (none)
385
+ def structapp
386
+ @zint_symbol[:structapp]
387
+ end
388
+
389
+ # Sets structured append info. Default structapp.count 0 (none)
390
+ #
391
+ # @param text [Structs::Structapp] Text of barcode
392
+ def structapp=(structapp)
393
+ reset_symbol
394
+
395
+ @zint_symbol[:structapp] = structapp
396
+ end
397
+
398
+ # Human Readable Text, which usually consists of input data plus one more check digit. Uses UTF-8 formatting.
353
399
  def text
354
- @zint_symbol[:text]
400
+ @zint_symbol[:text].to_s.force_encoding(Encoding::UTF_8)
355
401
  end
356
402
 
357
- # Sets text of barcode
403
+ # Sets Human Readable Text (if any), UTF-8, NUL-terminated (output only) of barcode
358
404
  #
359
405
  # @param text [String] Text of barcode
360
406
  def text=(text)
@@ -373,12 +419,12 @@ module Zint
373
419
  @zint_symbol[:width]
374
420
  end
375
421
 
376
- # Gets primary message data for more complex symbols, with a terminating NUL, of barcode
422
+ # Gets primary message data for more complex symbols
377
423
  def primary
378
- @zint_symbol[:primary]
424
+ @zint_symbol[:primary].to_s
379
425
  end
380
426
 
381
- # Sets primary message of barcode
427
+ # Sets primary message data (MaxiCode, Composite), NUL-terminated of barcode
382
428
  #
383
429
  # @param primary [String] Primary of barcode
384
430
  def primary=(primary)
@@ -387,12 +433,12 @@ module Zint
387
433
  @zint_symbol[:primary] = primary
388
434
  end
389
435
 
390
- # Gets encoded_data of barcode
436
+ # Gets encoded data of barcode
391
437
  def encoded_data
392
438
  @zint_symbol[:encoded_data]
393
439
  end
394
440
 
395
- # Sets encoded_data of barcode
441
+ # Sets encoded data (output only). Allows for rows of 1144 modules of barcode
396
442
  #
397
443
  # @param encoded_data [String] Encoded data of barcode
398
444
  def encoded_data=(encoded_data)
@@ -406,9 +452,9 @@ module Zint
406
452
  @zint_symbol[:row_height]
407
453
  end
408
454
 
409
- # Gets error text of barcode
455
+ # Gets error message in the event that an error occurred
410
456
  def errtxt
411
- @zint_symbol[:errtxt]
457
+ @zint_symbol[:errtxt].to_s.force_encoding(Encoding::UTF_8)
412
458
  end
413
459
 
414
460
  # Gets bitmap width of barcode
@@ -431,7 +477,7 @@ module Zint
431
477
  @zint_symbol[:dot_size]
432
478
  end
433
479
 
434
- # Sets dot size of barcode
480
+ # Sets size of dots used in BARCODE_DOTTY_MODE
435
481
  #
436
482
  # @param dot size [Float] Dot size of barcode
437
483
  def dot_size=(dot_size)
@@ -440,12 +486,12 @@ module Zint
440
486
  @zint_symbol[:dot_size] = dot_size
441
487
  end
442
488
 
443
- # Gets debug level of barcode
489
+ # Gets debugging flags
444
490
  def debug
445
491
  @zint_symbol[:debug]
446
492
  end
447
493
 
448
- # Sets debug level of barcode
494
+ # Sets debugging flags
449
495
  #
450
496
  # @param debug [Integer] Debug level of barcode
451
497
  def debug=(debug)
@@ -459,7 +505,7 @@ module Zint
459
505
  @zint_symbol[:warn_level]
460
506
  end
461
507
 
462
- # Sets warn level of barcode
508
+ # Sets warn level (affects error/warning value returned by Zint API (see WARN_XXX below)) of barcode
463
509
  #
464
510
  # @param warn_level [Integer] Warn level of barcode
465
511
  def warn_level=(warn_level)
@@ -1,7 +1,8 @@
1
1
  module Zint
2
- class Bind < Barcode
2
+ # IBM BC412 (SEMI T1-95)
3
+ class Bc412 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_BIND, options: options)
5
+ super(value: value, input_file: input_file, type: Zint::BARCODE_BC412, options: options)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/c25iata.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # 2 of 5 IATA
2
3
  class C25iata < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25IATA, options: options)
data/lib/zint/c25ind.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # 2 of 5 Industrial
2
3
  class C25ind < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25IND, options: options)
data/lib/zint/c25inter.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # 2 of 5 Interleaved
2
3
  class C25inter < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25INTER, options: options)
data/lib/zint/c25logic.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # 2 of 5 Data Logic
2
3
  class C25logic < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25LOGIC, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class C25matrix < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25MATRIX, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # 2 of 5 Standard (Matrix)
2
3
  class C25standard < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_C25STANDARD, options: options)
@@ -1,7 +1,8 @@
1
1
  module Zint
2
- class DottyMode < Barcode
2
+ # Brazilian CEPNet Postal Code
3
+ class CepNet < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_DOTTY_MODE, options: options)
5
+ super(value: value, input_file: input_file, type: Zint::BARCODE_CEPNET, options: options)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/channel.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Channel Code
2
3
  class Channel < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CHANNEL, options: options)
data/lib/zint/codabar.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Codabar
2
3
  class Codabar < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODABAR, options: options)
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Codablock-F
2
3
  class CodablockF < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODABLOCKF, options: options)
data/lib/zint/code11.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 11
2
3
  class Code11 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE11, options: options)
data/lib/zint/code128.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 128
2
3
  class Code128 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE128, options: options)
@@ -1,7 +1,8 @@
1
1
  module Zint
2
- class NoAscii < Barcode
2
+ # Code 128 (Suppress Code Set C)
3
+ class Code128AB < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_NO_ASCII, options: options)
5
+ super(value: value, input_file: input_file, type: Zint::BARCODE_CODE128AB, options: options)
5
6
  end
6
7
  end
7
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,4 +1,5 @@
1
1
  module Zint
2
+ # Code 16k
2
3
  class Code16k < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE16K, options: options)
data/lib/zint/code32.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 32
2
3
  class Code32 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE32, options: options)
data/lib/zint/code39.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 39
2
3
  class Code39 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE39, options: options)
data/lib/zint/code49.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 49
2
3
  class Code49 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE49, options: options)
data/lib/zint/code93.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code 93
2
3
  class Code93 < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODE93, options: options)
data/lib/zint/code_one.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # Code One
2
3
  class CodeOne < Barcode
3
4
  def initialize(value: nil, input_file: nil, options: {})
4
5
  super(value: value, input_file: input_file, type: Zint::BARCODE_CODEONE, options: options)
@@ -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