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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/ruby-zint/extconf.rb +2 -2
- data/lib/zint/aus_post.rb +1 -0
- data/lib/zint/aus_redirect.rb +1 -0
- data/lib/zint/aus_reply.rb +1 -0
- data/lib/zint/aus_route.rb +1 -0
- data/lib/zint/azrune.rb +1 -0
- data/lib/zint/aztec.rb +1 -0
- data/lib/zint/barcode.rb +85 -39
- data/lib/zint/{bind.rb → bc_412.rb} +3 -2
- data/lib/zint/c25iata.rb +1 -0
- data/lib/zint/c25ind.rb +1 -0
- data/lib/zint/c25inter.rb +1 -0
- data/lib/zint/c25logic.rb +1 -0
- data/lib/zint/c25matrix.rb +1 -0
- data/lib/zint/c25standard.rb +1 -0
- data/lib/zint/{dotty_mode.rb → cep_net.rb} +3 -2
- data/lib/zint/channel.rb +1 -0
- data/lib/zint/codabar.rb +1 -0
- data/lib/zint/codablock_f.rb +1 -0
- data/lib/zint/code11.rb +1 -0
- data/lib/zint/code128.rb +1 -0
- data/lib/zint/{noascii.rb → code128ab.rb} +3 -2
- data/lib/zint/code128b.rb +2 -4
- data/lib/zint/code16k.rb +1 -0
- data/lib/zint/code32.rb +1 -0
- data/lib/zint/code39.rb +1 -0
- data/lib/zint/code49.rb +1 -0
- data/lib/zint/code93.rb +1 -0
- data/lib/zint/code_one.rb +1 -0
- data/lib/zint/constants/capability_flags.rb +14 -11
- data/lib/zint/constants/input_data_types.rb +8 -7
- data/lib/zint/constants/output_options.rb +14 -11
- data/lib/zint/constants/symbologies.rb +13 -6
- data/lib/zint/constants/warn_levels.rb +1 -1
- data/lib/zint/daft.rb +1 -0
- data/lib/zint/data_matrix.rb +1 -0
- data/lib/zint/dbarexp.rb +1 -0
- data/lib/zint/dbarexpstk.rb +1 -0
- data/lib/zint/dbarltd.rb +1 -0
- data/lib/zint/dbaromn.rb +1 -0
- data/lib/zint/dbaromnstk.rb +1 -0
- data/lib/zint/dbarstk.rb +1 -0
- data/lib/zint/dependencies.rb +2 -2
- data/lib/zint/dot_code.rb +1 -0
- data/lib/zint/dpd.rb +1 -0
- data/lib/zint/dpident.rb +1 -0
- data/lib/zint/dpleit.rb +1 -0
- data/lib/zint/ean128.rb +1 -0
- data/lib/zint/ean14.rb +1 -0
- data/lib/zint/eanx.rb +1 -0
- data/lib/zint/eanxchk.rb +1 -0
- data/lib/zint/excode39.rb +1 -0
- data/lib/zint/fim.rb +1 -0
- data/lib/zint/flat.rb +1 -0
- data/lib/zint/grid_matrix.rb +1 -0
- data/lib/zint/gs1_128.rb +1 -0
- data/lib/zint/hanxin.rb +1 -0
- data/lib/zint/hibc128.rb +1 -0
- data/lib/zint/hibc39.rb +1 -0
- data/lib/zint/hibcaztec.rb +1 -0
- data/lib/zint/hibcblockf.rb +1 -0
- data/lib/zint/hibcdm.rb +1 -0
- data/lib/zint/hibcmicpdf.rb +1 -0
- data/lib/zint/hibcpdf.rb +1 -0
- data/lib/zint/hibcqr.rb +1 -0
- data/lib/zint/isbnx.rb +1 -0
- data/lib/zint/itf14.rb +1 -0
- data/lib/zint/japan_post.rb +1 -0
- data/lib/zint/kix.rb +1 -0
- data/lib/zint/korea_post.rb +1 -0
- data/lib/zint/logmars.rb +1 -0
- data/lib/zint/mailmark.rb +1 -0
- data/lib/zint/mailmark_2d.rb +8 -0
- data/lib/zint/mailmark_4s.rb +8 -0
- data/lib/zint/maxi_code.rb +1 -0
- data/lib/zint/micro_pdf417.rb +1 -0
- data/lib/zint/micro_qr.rb +1 -0
- data/lib/zint/msiplessey.rb +1 -0
- data/lib/zint/native.rb +1 -1
- data/lib/zint/nve18.rb +1 -0
- data/lib/zint/one_code.rb +1 -0
- data/lib/zint/pdf417.rb +1 -0
- data/lib/zint/pdf417comp.rb +1 -0
- data/lib/zint/pdf417trunc.rb +1 -0
- data/lib/zint/pharma.rb +1 -0
- data/lib/zint/pharmatwo.rb +1 -0
- data/lib/zint/planet.rb +1 -0
- data/lib/zint/plessey.rb +1 -0
- data/lib/zint/postnet.rb +1 -0
- data/lib/zint/pzn.rb +1 -0
- data/lib/zint/qr.rb +1 -0
- data/lib/zint/rmqr.rb +1 -0
- data/lib/zint/rss14.rb +1 -0
- data/lib/zint/rss14stack.rb +1 -0
- data/lib/zint/rss14stackomni.rb +1 -0
- data/lib/zint/rssexp.rb +1 -0
- data/lib/zint/rssexpstack.rb +1 -0
- data/lib/zint/rssltd.rb +1 -0
- data/lib/zint/structs/structapp.rb +25 -0
- data/lib/zint/structs/symbol.rb +38 -35
- data/lib/zint/structs/vector_circle.rb +3 -2
- data/lib/zint/telepen.rb +1 -0
- data/lib/zint/telepennum.rb +1 -0
- data/lib/zint/ultra.rb +1 -0
- data/lib/zint/upc_a.rb +1 -0
- data/lib/zint/upc_a_chk.rb +1 -0
- data/lib/zint/upc_e.rb +1 -0
- data/lib/zint/upc_e_chk.rb +1 -0
- data/lib/zint/upnqr.rb +1 -0
- data/lib/zint/{box.rb → upu_s10.rb} +3 -2
- data/lib/zint/uspsimail.rb +1 -0
- data/lib/zint/version.rb +1 -1
- data/lib/zint/vin.rb +1 -0
- data/lib/zint.rb +8 -1
- data/ports/archives/zint-2.12.0-src.tar.gz +0 -0
- metadata +9 -7
- data/lib/zint/stdout.rb +0 -7
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cbe79d9fd528474b3cffe957b55cf8cb4aec0bdc97cca55314dc675e74f58c3
|
|
4
|
+
data.tar.gz: a99a851ff4cfc42387d58e2d439c2ae01976fe03ad81595ccdc60cd94f0f5a89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
|
data/ext/ruby-zint/extconf.rb
CHANGED
|
@@ -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.
|
|
48
|
+
ffi_lib(%w[libzint.so.2.12 libzint zint])
|
|
49
49
|
attach_function(:ZBarcode_Version, [], :int32)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
(
|
|
52
|
+
(21200...21300) === m.ZBarcode_Version
|
|
53
53
|
rescue LoadError
|
|
54
54
|
false
|
|
55
55
|
end
|
data/lib/zint/aus_post.rb
CHANGED
data/lib/zint/aus_redirect.rb
CHANGED
data/lib/zint/aus_reply.rb
CHANGED
data/lib/zint/aus_route.rb
CHANGED
data/lib/zint/azrune.rb
CHANGED
data/lib/zint/aztec.rb
CHANGED
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
#
|
|
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
|
|
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
|
|
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
|
-
#
|
|
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
|
|
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
|
-
#
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
436
|
+
# Gets encoded data of barcode
|
|
391
437
|
def encoded_data
|
|
392
438
|
@zint_symbol[:encoded_data]
|
|
393
439
|
end
|
|
394
440
|
|
|
395
|
-
# Sets
|
|
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
|
|
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
|
|
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
|
|
489
|
+
# Gets debugging flags
|
|
444
490
|
def debug
|
|
445
491
|
@zint_symbol[:debug]
|
|
446
492
|
end
|
|
447
493
|
|
|
448
|
-
# Sets
|
|
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
|
-
|
|
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::
|
|
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
data/lib/zint/c25ind.rb
CHANGED
data/lib/zint/c25inter.rb
CHANGED
data/lib/zint/c25logic.rb
CHANGED
data/lib/zint/c25matrix.rb
CHANGED
data/lib/zint/c25standard.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module Zint
|
|
2
|
-
|
|
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::
|
|
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
data/lib/zint/codabar.rb
CHANGED
data/lib/zint/codablock_f.rb
CHANGED
data/lib/zint/code11.rb
CHANGED
data/lib/zint/code128.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module Zint
|
|
2
|
-
|
|
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::
|
|
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
data/lib/zint/code16k.rb
CHANGED
data/lib/zint/code32.rb
CHANGED
data/lib/zint/code39.rb
CHANGED
data/lib/zint/code49.rb
CHANGED
data/lib/zint/code93.rb
CHANGED
data/lib/zint/code_one.rb
CHANGED
|
@@ -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
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|