udrs 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/udrs/renderers/escp_renderer.rb +65 -3
- data/lib/udrs/renderers/escp_renderer/table.rb +11 -1
- data/lib/udrs/renderers/pdf_renderer.rb +4 -4
- data/lib/udrs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfb80ccd266e332027ba564d3d77e12e2f516240
|
4
|
+
data.tar.gz: eb97860256eea803d8fad23e1bfcadc07e871165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af7832aa53f8f464e8032912bf1f69aa1196f98fa917e43a07526c8233b942efec4e475b0fdcd0fd426c705217283c5d79cc61f747ae412cc91156eb15b026e
|
7
|
+
data.tar.gz: 968de9f95db11f4d96f5ab3eb00ad5c65d9fed1ccc42895337dbf9294e543fb5bc0374d4c6ef24af1051eb480b14d80be8cf5b2bd2b30813fcedc0c07b61924d
|
@@ -22,14 +22,75 @@ module UDRS
|
|
22
22
|
GS = 29.chr
|
23
23
|
|
24
24
|
CHARACTER_MAP = {
|
25
|
-
'
|
25
|
+
'Ç' => "\x80",
|
26
|
+
'ü' => "\x81",
|
27
|
+
'é' => "\x82",
|
28
|
+
'â' => "\x83",
|
29
|
+
'ä' => "\x84",
|
30
|
+
'à' => "\x85",
|
31
|
+
'å' => "\x86",
|
32
|
+
'ç' => "\x87",
|
33
|
+
'ê' => "\x88",
|
34
|
+
'ë' => "\x89",
|
35
|
+
'è' => "\x8A",
|
36
|
+
'ï' => "\x8B",
|
37
|
+
'î' => "\x8C",
|
38
|
+
'ì' => "\x8D",
|
39
|
+
'Ä' => "\x8E",
|
40
|
+
'Å' => "\x8F",
|
41
|
+
'É' => "\x90",
|
42
|
+
'æ' => "\x91",
|
43
|
+
'Æ' => "\x92",
|
44
|
+
'ô' => "\x93",
|
45
|
+
'ö' => "\x94",
|
46
|
+
'ò' => "\x95",
|
47
|
+
'û' => "\x96",
|
48
|
+
'ù' => "\x97",
|
49
|
+
'ÿ' => "\x98",
|
50
|
+
'Ö' => "\x99",
|
51
|
+
'Ü' => "\x9A",
|
52
|
+
'ø' => "\x9B",
|
26
53
|
'£' => "\x9C",
|
27
|
-
'
|
54
|
+
'Ø' => "\x9D",
|
55
|
+
'á' => "\xA0",
|
56
|
+
'í' => "\xA1",
|
57
|
+
'ó' => "\xA2",
|
58
|
+
'ú' => "\xA3",
|
59
|
+
'ñ' => "\xA4",
|
60
|
+
'Ñ' => "\xA5",
|
61
|
+
'ª' => "\xA6",
|
62
|
+
'º' => "\xA7",
|
63
|
+
'¿' => "\xA8",
|
64
|
+
'®' => "\xA9",
|
28
65
|
'«' => "\xAE",
|
29
66
|
'»' => "\xAF",
|
30
67
|
'→' => "\xAF",
|
68
|
+
'Á' => "\xB5",
|
69
|
+
'Â' => "\xB6",
|
70
|
+
'À' => "\xB7",
|
31
71
|
'©' => "\xB8",
|
32
|
-
'
|
72
|
+
'¢' => "\xBD",
|
73
|
+
'ã' => "\xC6",
|
74
|
+
'Ã' => "\xC7",
|
75
|
+
'Ê' => "\xD2",
|
76
|
+
'Ë' => "\xD3",
|
77
|
+
'È' => "\xD4",
|
78
|
+
'€' => "\xD5",
|
79
|
+
'Í' => "\xD6",
|
80
|
+
'Î' => "\xD7",
|
81
|
+
'Ï' => "\xD8",
|
82
|
+
'Ì' => "\xDE",
|
83
|
+
'Ó' => "\xE0",
|
84
|
+
'ß' => "\xE1",
|
85
|
+
'Ô' => "\xE2",
|
86
|
+
'Ò' => "\xE3",
|
87
|
+
'õ' => "\xE4",
|
88
|
+
'Õ' => "\xE5",
|
89
|
+
'Ú' => "\xE9",
|
90
|
+
'Û' => "\xEA",
|
91
|
+
'Ù' => "\xEB",
|
92
|
+
'ý' => "\xEC",
|
93
|
+
'Ý' => "\xED",
|
33
94
|
}
|
34
95
|
|
35
96
|
CODE_NUM = 48 # The code num for PDF417
|
@@ -89,6 +150,7 @@ module UDRS
|
|
89
150
|
when 2
|
90
151
|
add_spacer
|
91
152
|
add_line(header.text, size: :large, bold: true)
|
153
|
+
add_spacer
|
92
154
|
|
93
155
|
when 3
|
94
156
|
add_line(header.text, size: :medium, bold: true)
|
@@ -24,17 +24,27 @@ module UDRS
|
|
24
24
|
# Make all the blocks have the same amount of lines
|
25
25
|
max_length = parts.map(&:size).max
|
26
26
|
column_widths.zip(parts).each do |width, lines|
|
27
|
+
next if width == 0
|
27
28
|
lines << (' ' * width) while lines.size < max_length
|
28
29
|
end
|
29
30
|
|
30
31
|
# Add lines
|
31
32
|
parts.transpose.each do |line_parts|
|
33
|
+
missing = @line_width
|
34
|
+
|
32
35
|
cells.zip(line_parts).each_with_index do |(cell, part), i|
|
33
|
-
|
36
|
+
if i > 0
|
37
|
+
@buffer << ' '
|
38
|
+
missing -= 1
|
39
|
+
end
|
40
|
+
|
34
41
|
font(text_to_options(cell)) do
|
35
42
|
@buffer << part
|
43
|
+
missing -= part.size
|
36
44
|
end
|
37
45
|
end
|
46
|
+
|
47
|
+
@buffer << ' ' * missing
|
38
48
|
end
|
39
49
|
end
|
40
50
|
|
data/lib/udrs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: udrs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michon van Dooren
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attribute_predicates
|