rghost_barcode 0.8
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.
- data/lib/doc/classes/RGhost.html +109 -0
- data/lib/doc/classes/RGhost/Barcode.html +147 -0
- data/lib/doc/classes/RGhost/Barcode/Auspost.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Azteccode.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Base.html +266 -0
- data/lib/doc/classes/RGhost/Barcode/Base.src/M000004.html +34 -0
- data/lib/doc/classes/RGhost/Barcode/Base.src/M000005.html +30 -0
- data/lib/doc/classes/RGhost/Barcode/Base.src/M000006.html +20 -0
- data/lib/doc/classes/RGhost/Barcode/Border.html +170 -0
- data/lib/doc/classes/RGhost/Barcode/Border.src/M000001.html +27 -0
- data/lib/doc/classes/RGhost/Barcode/Code11.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Code128.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Code2of5.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Code39.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Code93.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Datamatrix.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Ean13.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Ean2.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Ean5.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Ean8.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Guard.html +174 -0
- data/lib/doc/classes/RGhost/Barcode/Guard.src/M000003.html +27 -0
- data/lib/doc/classes/RGhost/Barcode/Interleaved2of5.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Isbn.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Kix.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Maxicode.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Msi.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Onecode.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.html +262 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000007.html +20 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000008.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000009.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000010.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000011.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000012.html +24 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000013.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000014.html +18 -0
- data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000015.html +16 -0
- data/lib/doc/classes/RGhost/Barcode/Pdf417.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Pharmacode.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Plessey.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Postnet.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Qrcode.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Rationalizedcodabar.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Raw.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Royalmail.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Rss14.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Rssexpanded.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Rsslimited.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Symbol.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Text.html +193 -0
- data/lib/doc/classes/RGhost/Barcode/Text.src/M000002.html +30 -0
- data/lib/doc/classes/RGhost/Barcode/Upca.html +113 -0
- data/lib/doc/classes/RGhost/Barcode/Upce.html +113 -0
- data/lib/doc/classes/RGhost/Config.html +150 -0
- data/lib/doc/classes/RGhost/Config.src/M000016.html +45 -0
- data/lib/doc/classes/RGhost/Document.html +704 -0
- data/lib/doc/classes/RGhost/Document.src/M000017.html +19 -0
- data/lib/doc/classes/RGhost/Document.src/M000018.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000019.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000020.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000021.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000022.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000023.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000024.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000025.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000026.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000027.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000028.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000029.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000030.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000031.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000032.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000033.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000034.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000035.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000036.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000037.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000038.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000039.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000040.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000041.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000042.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000043.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000044.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000045.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000046.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000047.html +18 -0
- data/lib/doc/classes/RGhost/Document.src/M000048.html +18 -0
- data/lib/doc/created.rid +1 -0
- data/lib/doc/files/rghost_barcode/rghost_barcode_adapter_rb.html +101 -0
- data/lib/doc/files/rghost_barcode/rghost_barcode_base_rb.html +101 -0
- data/lib/doc/files/rghost_barcode/rghost_barcode_classes_rb.html +101 -0
- data/lib/doc/files/rghost_barcode/rghost_barcode_examples_rb.html +101 -0
- data/lib/doc/files/rghost_barcode/rghost_barcode_version_rb.html +101 -0
- data/lib/doc/files/rghost_barcode_rb.html +111 -0
- data/lib/doc/files/teste_main_rb.html +110 -0
- data/lib/doc/fr_class_index.html +67 -0
- data/lib/doc/fr_file_index.html +33 -0
- data/lib/doc/fr_method_index.html +74 -0
- data/lib/doc/index.html +24 -0
- data/lib/rghost_barcode.rb +7 -0
- data/lib/rghost_barcode/ps/auspost.ps +192 -0
- data/lib/rghost_barcode/ps/azteccode.ps +357 -0
- data/lib/rghost_barcode/ps/barcode_template.eps +1193 -0
- data/lib/rghost_barcode/ps/code11.ps +128 -0
- data/lib/rghost_barcode/ps/code128.ps +121 -0
- data/lib/rghost_barcode/ps/code2of5.ps +106 -0
- data/lib/rghost_barcode/ps/code39.ps +109 -0
- data/lib/rghost_barcode/ps/code93.ps +117 -0
- data/lib/rghost_barcode/ps/datamatrix.ps +328 -0
- data/lib/rghost_barcode/ps/ean13.ps +183 -0
- data/lib/rghost_barcode/ps/ean2.ps +101 -0
- data/lib/rghost_barcode/ps/ean5.ps +116 -0
- data/lib/rghost_barcode/ps/ean8.ps +101 -0
- data/lib/rghost_barcode/ps/interleaved2of5.ps +132 -0
- data/lib/rghost_barcode/ps/isbn.ps +118 -0
- data/lib/rghost_barcode/ps/kix.ps +98 -0
- data/lib/rghost_barcode/ps/maxicode.ps +307 -0
- data/lib/rghost_barcode/ps/msi.ps +104 -0
- data/lib/rghost_barcode/ps/onecode.ps +276 -0
- data/lib/rghost_barcode/ps/pdf417.ps +428 -0
- data/lib/rghost_barcode/ps/pharmacode.ps +69 -0
- data/lib/rghost_barcode/ps/plessey.ps +121 -0
- data/lib/rghost_barcode/ps/postnet.ps +114 -0
- data/lib/rghost_barcode/ps/qrcode.ps +530 -0
- data/lib/rghost_barcode/ps/rationalizedcodabar.ps +117 -0
- data/lib/rghost_barcode/ps/raw.ps +35 -0
- data/lib/rghost_barcode/ps/render.ps +307 -0
- data/lib/rghost_barcode/ps/render.ps~ +308 -0
- data/lib/rghost_barcode/ps/royalmail.ps +119 -0
- data/lib/rghost_barcode/ps/rss14.ps +237 -0
- data/lib/rghost_barcode/ps/rssexpanded.ps +211 -0
- data/lib/rghost_barcode/ps/rsslimited.ps +191 -0
- data/lib/rghost_barcode/ps/symbol.ps +49 -0
- data/lib/rghost_barcode/ps/upca.ps +128 -0
- data/lib/rghost_barcode/ps/upce.ps +157 -0
- data/lib/rghost_barcode/rghost_barcode_adapter.rb +249 -0
- data/lib/rghost_barcode/rghost_barcode_base.rb +210 -0
- data/lib/rghost_barcode/rghost_barcode_classes.rb +96 -0
- data/lib/rghost_barcode/rghost_barcode_examples.rb +35 -0
- data/lib/rghost_barcode/rghost_barcode_version.rb +8 -0
- data/lib/teste_main.rb +94 -0
- metadata +218 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
|
|
2
|
+
% --DESC: Reduced Space Symbology Expanded (RSS-Expanded)
|
|
3
|
+
% --EXAM: 000000010011001010100001000000010000
|
|
4
|
+
% --EXOP: height=0.3
|
|
5
|
+
% --RNDR: renlinear
|
|
6
|
+
/rssexpanded {
|
|
7
|
+
|
|
8
|
+
0 begin % Confine variables to local scope
|
|
9
|
+
|
|
10
|
+
/options exch def % We are given an option string
|
|
11
|
+
/useropts options def
|
|
12
|
+
/barcode exch def % We are given a barcode string
|
|
13
|
+
|
|
14
|
+
/height 1 def
|
|
15
|
+
|
|
16
|
+
% Parse the input options
|
|
17
|
+
options {
|
|
18
|
+
token false eq {exit} if dup length string cvs (=) search
|
|
19
|
+
true eq {cvlit exch pop exch def} {cvlit true def} ifelse
|
|
20
|
+
} loop
|
|
21
|
+
|
|
22
|
+
/height height cvr def
|
|
23
|
+
|
|
24
|
+
/getRSSwidths {
|
|
25
|
+
/oe exch def
|
|
26
|
+
/mw exch def
|
|
27
|
+
/nm exch def
|
|
28
|
+
/val exch def
|
|
29
|
+
/j 0 def /i 0 def {
|
|
30
|
+
/v () def
|
|
31
|
+
mw 1 ne {/v i mw 4 string cvrs def} if
|
|
32
|
+
0 v {48 sub add} forall 4 add nm eq {
|
|
33
|
+
/out [ 4 {1} repeat v {47 sub} forall ] v length 4 getinterval def
|
|
34
|
+
/hasone false def out {1 eq {/hasone true def} if} forall
|
|
35
|
+
/lessfive out 0 get 5 lt def
|
|
36
|
+
oe not hasone lessfive and or {
|
|
37
|
+
j val eq {exit} if
|
|
38
|
+
/j j 1 add def
|
|
39
|
+
} if
|
|
40
|
+
} if
|
|
41
|
+
/i i 1 add def
|
|
42
|
+
} loop
|
|
43
|
+
out
|
|
44
|
+
} bind def
|
|
45
|
+
|
|
46
|
+
/binval [barcode {48 sub} forall] def
|
|
47
|
+
/datalen binval length 12 idiv def
|
|
48
|
+
|
|
49
|
+
/tab174 [
|
|
50
|
+
347 0 12 5 7 2 87 4
|
|
51
|
+
1387 348 10 7 5 4 52 20
|
|
52
|
+
2947 1388 8 9 4 5 30 52
|
|
53
|
+
3987 2948 6 11 3 6 10 104
|
|
54
|
+
4191 3988 4 13 1 8 1 204
|
|
55
|
+
] def
|
|
56
|
+
|
|
57
|
+
/dxw datalen array def
|
|
58
|
+
|
|
59
|
+
0 1 datalen 1 sub {
|
|
60
|
+
|
|
61
|
+
/x exch def
|
|
62
|
+
|
|
63
|
+
/d binval x 12 mul 12 getinterval def
|
|
64
|
+
/d 0 0 1 11 {/j exch def 2 11 j sub exp cvi d j get mul add} for def
|
|
65
|
+
|
|
66
|
+
/j 0 def {
|
|
67
|
+
d tab174 j get le {
|
|
68
|
+
tab174 j 1 add 7 getinterval {} forall
|
|
69
|
+
/dte exch def /dto exch def
|
|
70
|
+
/dmwe exch def /dmwo exch def
|
|
71
|
+
/dele exch def /delo exch def
|
|
72
|
+
/dgs exch def
|
|
73
|
+
exit
|
|
74
|
+
} if
|
|
75
|
+
/j j 8 add def
|
|
76
|
+
} loop
|
|
77
|
+
|
|
78
|
+
/dwo d dgs sub dte idiv delo dmwo true getRSSwidths def
|
|
79
|
+
/dwe d dgs sub dte mod dele dmwe false getRSSwidths def
|
|
80
|
+
|
|
81
|
+
/dw 8 array def
|
|
82
|
+
x 2 mod 0 eq {
|
|
83
|
+
0 1 3 {
|
|
84
|
+
/j exch def
|
|
85
|
+
dw 7 j 2 mul sub dwo j get put
|
|
86
|
+
dw 6 j 2 mul sub dwe j get put
|
|
87
|
+
} for
|
|
88
|
+
} {
|
|
89
|
+
0 1 3 {
|
|
90
|
+
/j exch def
|
|
91
|
+
dw j 2 mul dwo j get put
|
|
92
|
+
dw j 2 mul 1 add dwe j get put
|
|
93
|
+
} for
|
|
94
|
+
} ifelse
|
|
95
|
+
|
|
96
|
+
dxw x dw put
|
|
97
|
+
|
|
98
|
+
} for
|
|
99
|
+
|
|
100
|
+
/widths [
|
|
101
|
+
dxw {{} forall} forall
|
|
102
|
+
] def
|
|
103
|
+
|
|
104
|
+
/checkweights [
|
|
105
|
+
77 96 32 81 27 9 3 1
|
|
106
|
+
20 60 180 118 143 7 21 63
|
|
107
|
+
205 209 140 117 39 13 145 189
|
|
108
|
+
193 157 49 147 19 57 171 91
|
|
109
|
+
132 44 85 169 197 136 186 62
|
|
110
|
+
185 133 188 142 4 12 36 108
|
|
111
|
+
50 87 29 80 97 173 128 113
|
|
112
|
+
150 28 84 41 123 158 52 156
|
|
113
|
+
166 196 206 139 187 203 138 46
|
|
114
|
+
76 17 51 153 37 111 122 155
|
|
115
|
+
146 119 110 107 106 176 129 43
|
|
116
|
+
16 48 144 10 30 90 59 177
|
|
117
|
+
164 125 112 178 200 137 116 109
|
|
118
|
+
70 210 208 202 184 130 179 115
|
|
119
|
+
190 204 68 93 31 151 191 134
|
|
120
|
+
148 22 66 198 172 94 71 2
|
|
121
|
+
40 154 192 64 162 54 18 6
|
|
122
|
+
120 149 25 75 14 42 126 167
|
|
123
|
+
175 199 207 69 23 78 26 79
|
|
124
|
+
103 98 83 38 114 131 182 124
|
|
125
|
+
159 53 88 170 127 183 61 161
|
|
126
|
+
55 165 73 8 24 72 5 15
|
|
127
|
+
89 100 174 58 160 194 135 45
|
|
128
|
+
] def
|
|
129
|
+
|
|
130
|
+
/checksum 0 def
|
|
131
|
+
0 1 widths length 1 sub {
|
|
132
|
+
/i exch def
|
|
133
|
+
/checksum checksum widths i get checkweights i get mul add def
|
|
134
|
+
} for
|
|
135
|
+
/checksum checksum 211 mod datalen 3 sub 211 mul add def
|
|
136
|
+
|
|
137
|
+
/i 0 def {
|
|
138
|
+
checksum tab174 i get le {
|
|
139
|
+
tab174 i 1 add 7 getinterval {} forall
|
|
140
|
+
/cte exch def /cto exch def
|
|
141
|
+
/cmwe exch def /cmwo exch def
|
|
142
|
+
/cele exch def /celo exch def
|
|
143
|
+
/cgs exch def
|
|
144
|
+
exit
|
|
145
|
+
} if
|
|
146
|
+
/i i 8 add def
|
|
147
|
+
} loop
|
|
148
|
+
|
|
149
|
+
/cwo checksum cgs sub cte idiv celo cmwo true getRSSwidths def
|
|
150
|
+
/cwe checksum cgs sub cte mod cele cmwe false getRSSwidths def
|
|
151
|
+
|
|
152
|
+
/cw 8 array def
|
|
153
|
+
0 1 3 {
|
|
154
|
+
/i exch def
|
|
155
|
+
cw i 2 mul cwo i get put
|
|
156
|
+
cw i 2 mul 1 add cwe i get put
|
|
157
|
+
} for
|
|
158
|
+
|
|
159
|
+
/finderwidths [
|
|
160
|
+
1 8 4 1 1 1 1 4 8 1
|
|
161
|
+
3 6 4 1 1 1 1 4 6 3
|
|
162
|
+
3 4 6 1 1 1 1 6 4 3
|
|
163
|
+
3 2 8 1 1 1 1 8 2 3
|
|
164
|
+
2 6 5 1 1 1 1 5 6 2
|
|
165
|
+
2 2 9 1 1 1 1 9 2 2
|
|
166
|
+
] def
|
|
167
|
+
|
|
168
|
+
/finderseq [
|
|
169
|
+
[0 1]
|
|
170
|
+
[0 3 2]
|
|
171
|
+
[0 5 2 7]
|
|
172
|
+
[0 9 2 7 4]
|
|
173
|
+
[0 9 2 7 6 11]
|
|
174
|
+
[0 9 2 7 8 11 10]
|
|
175
|
+
[0 1 2 3 4 5 6 7]
|
|
176
|
+
[0 1 2 3 4 5 6 9 8]
|
|
177
|
+
[0 1 2 3 4 5 6 9 10 11]
|
|
178
|
+
[0 1 2 3 4 7 6 9 8 11 10]
|
|
179
|
+
] def
|
|
180
|
+
|
|
181
|
+
/seq finderseq datalen 2 add 2 idiv 2 sub get def
|
|
182
|
+
/fxw seq length array def
|
|
183
|
+
0 1 seq length 1 sub {
|
|
184
|
+
/x exch def
|
|
185
|
+
fxw x finderwidths seq x get 5 mul 5 getinterval put
|
|
186
|
+
} for
|
|
187
|
+
|
|
188
|
+
/sbs [
|
|
189
|
+
1
|
|
190
|
+
cw {} forall
|
|
191
|
+
0 1 datalen 1 sub {
|
|
192
|
+
/i exch def
|
|
193
|
+
i 2 mod 0 eq {fxw i 2 idiv get {} forall} if
|
|
194
|
+
dxw i get {} forall
|
|
195
|
+
} for
|
|
196
|
+
1 1
|
|
197
|
+
] def
|
|
198
|
+
|
|
199
|
+
% Return the arguments
|
|
200
|
+
/retval 8 dict def
|
|
201
|
+
retval (ren) (renlinear) put
|
|
202
|
+
retval (sbs) sbs put
|
|
203
|
+
retval (bhs) [sbs length 1 add 2 idiv {height} repeat] put
|
|
204
|
+
retval (bbs) [sbs length 1 add 2 idiv {0} repeat] put
|
|
205
|
+
retval (opt) useropts put
|
|
206
|
+
retval
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
} bind def
|
|
211
|
+
/rssexpanded load 0 1 dict put
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
% --DESC: Reduced Space Symbology Limited (RSS-Limited)
|
|
3
|
+
% --EXAM: 00978186074271
|
|
4
|
+
% --EXOP: height=0.3
|
|
5
|
+
% --RNDR: renlinear
|
|
6
|
+
/rsslimited {
|
|
7
|
+
|
|
8
|
+
0 begin % Confine variables to local scope
|
|
9
|
+
|
|
10
|
+
/options exch def % We are given an option string
|
|
11
|
+
/useropts options def
|
|
12
|
+
/barcode exch def % We are given a barcode string
|
|
13
|
+
|
|
14
|
+
/height 1 def
|
|
15
|
+
|
|
16
|
+
% Parse the input options
|
|
17
|
+
options {
|
|
18
|
+
token false eq {exit} if dup length string cvs (=) search
|
|
19
|
+
true eq {cvlit exch pop exch def} {cvlit true def} ifelse
|
|
20
|
+
} loop
|
|
21
|
+
|
|
22
|
+
% Create the human readable text
|
|
23
|
+
/txt barcode length array def
|
|
24
|
+
0 1 barcode length 1 sub {
|
|
25
|
+
/i exch def
|
|
26
|
+
txt i [barcode i 1 getinterval 0 0 () 0] put
|
|
27
|
+
} for
|
|
28
|
+
|
|
29
|
+
/height height cvr def
|
|
30
|
+
|
|
31
|
+
/getRSSwidths {
|
|
32
|
+
/oe exch def
|
|
33
|
+
/el exch def
|
|
34
|
+
/mw exch def
|
|
35
|
+
/nm exch def
|
|
36
|
+
/val exch def
|
|
37
|
+
/j 0 def /i 0 def {
|
|
38
|
+
/v () def
|
|
39
|
+
mw 1 ne {/v i mw el string cvrs def} if
|
|
40
|
+
0 v {48 sub add} forall el add nm eq {
|
|
41
|
+
/out [ el {1} repeat v {47 sub} forall ] v length el getinterval def
|
|
42
|
+
/hasone false def out {1 eq {/hasone true def} if} forall
|
|
43
|
+
oe not hasone or {
|
|
44
|
+
j val eq {exit} if
|
|
45
|
+
/j j 1 add def
|
|
46
|
+
} if
|
|
47
|
+
} if
|
|
48
|
+
/i i 1 add def
|
|
49
|
+
} loop
|
|
50
|
+
out
|
|
51
|
+
} bind def
|
|
52
|
+
|
|
53
|
+
/binval [barcode {48 sub} forall] def
|
|
54
|
+
/binval [binval 0 13 getinterval {} forall] def
|
|
55
|
+
|
|
56
|
+
0 1 11 {
|
|
57
|
+
/i exch def
|
|
58
|
+
binval i 1 add 2 copy get binval i get 2013571 mod 10 mul add put
|
|
59
|
+
binval i binval i get 2013571 idiv put
|
|
60
|
+
} for
|
|
61
|
+
/d2 binval 12 get 2013571 mod def
|
|
62
|
+
binval 12 2 copy get 2013571 idiv put
|
|
63
|
+
|
|
64
|
+
/d1 0 def
|
|
65
|
+
/i true def
|
|
66
|
+
0 1 12 {
|
|
67
|
+
/j exch def
|
|
68
|
+
binval j get
|
|
69
|
+
dup 0 eq i and {
|
|
70
|
+
pop
|
|
71
|
+
} {
|
|
72
|
+
/i false def
|
|
73
|
+
/d1 d1 3 -1 roll 10 12 j sub exp cvi mul add def
|
|
74
|
+
} ifelse
|
|
75
|
+
} for
|
|
76
|
+
|
|
77
|
+
/tab267 [
|
|
78
|
+
183063 0 17 9 6 3 6538 28
|
|
79
|
+
820063 183064 13 13 5 4 875 728
|
|
80
|
+
1000775 820064 9 17 3 6 28 6454
|
|
81
|
+
1491020 1000776 15 11 5 4 2415 203
|
|
82
|
+
1979844 1491021 11 15 4 5 203 2408
|
|
83
|
+
1996938 1979845 19 7 8 1 17094 1
|
|
84
|
+
2013570 1996939 7 19 1 8 1 16632
|
|
85
|
+
] def
|
|
86
|
+
|
|
87
|
+
/i 0 def {
|
|
88
|
+
d1 tab267 i get le {
|
|
89
|
+
tab267 i 1 add 7 getinterval {} forall
|
|
90
|
+
/d1te exch def /d1to exch def
|
|
91
|
+
/d1mwe exch def /d1mwo exch def
|
|
92
|
+
/d1ele exch def /d1elo exch def
|
|
93
|
+
/d1gs exch def
|
|
94
|
+
exit
|
|
95
|
+
} if
|
|
96
|
+
/i i 8 add def
|
|
97
|
+
} loop
|
|
98
|
+
|
|
99
|
+
/i 0 def {
|
|
100
|
+
d2 tab267 i get le {
|
|
101
|
+
tab267 i 1 add 7 getinterval {} forall
|
|
102
|
+
/d2te exch def /d2to exch def
|
|
103
|
+
/d2mwe exch def /d2mwo exch def
|
|
104
|
+
/d2ele exch def /d2elo exch def
|
|
105
|
+
/d2gs exch def
|
|
106
|
+
exit
|
|
107
|
+
} if
|
|
108
|
+
/i i 8 add def
|
|
109
|
+
} loop
|
|
110
|
+
|
|
111
|
+
/d1wo d1 d1gs sub d1te idiv d1elo d1mwo 7 false getRSSwidths def
|
|
112
|
+
/d1we d1 d1gs sub d1te mod d1ele d1mwe 7 true getRSSwidths def
|
|
113
|
+
/d2wo d2 d2gs sub d2te idiv d2elo d2mwo 7 false getRSSwidths def
|
|
114
|
+
/d2we d2 d2gs sub d2te mod d2ele d2mwe 7 true getRSSwidths def
|
|
115
|
+
|
|
116
|
+
/d1w 14 array def
|
|
117
|
+
0 1 6 {
|
|
118
|
+
/i exch def
|
|
119
|
+
d1w i 2 mul d1wo i get put
|
|
120
|
+
d1w i 2 mul 1 add d1we i get put
|
|
121
|
+
} for
|
|
122
|
+
|
|
123
|
+
/d2w 14 array def
|
|
124
|
+
0 1 6 {
|
|
125
|
+
/i exch def
|
|
126
|
+
d2w i 2 mul d2wo i get put
|
|
127
|
+
d2w i 2 mul 1 add d2we i get put
|
|
128
|
+
} for
|
|
129
|
+
|
|
130
|
+
/widths [
|
|
131
|
+
d1w {} forall
|
|
132
|
+
d2w {} forall
|
|
133
|
+
] def
|
|
134
|
+
|
|
135
|
+
/checkweights [
|
|
136
|
+
1 3 9 27 81 65 17 51 64 14 42 37 22 66
|
|
137
|
+
20 60 2 6 18 54 73 41 34 13 39 28 84 74
|
|
138
|
+
] def
|
|
139
|
+
|
|
140
|
+
/checkseq [
|
|
141
|
+
0 1 43 {} for
|
|
142
|
+
45 52 57
|
|
143
|
+
63 1 66 {} for
|
|
144
|
+
73 1 79 {} for
|
|
145
|
+
82
|
|
146
|
+
126 1 130 {} for
|
|
147
|
+
132
|
|
148
|
+
141 1 146 {} for
|
|
149
|
+
210 1 217 {} for
|
|
150
|
+
220
|
|
151
|
+
316 1 320 {} for
|
|
152
|
+
322 323
|
|
153
|
+
326 337
|
|
154
|
+
] def
|
|
155
|
+
|
|
156
|
+
/checksum 0 def
|
|
157
|
+
0 1 27 {
|
|
158
|
+
/i exch def
|
|
159
|
+
/checksum checksum widths i get checkweights i get mul add def
|
|
160
|
+
} for
|
|
161
|
+
/checksum checksum 89 mod def
|
|
162
|
+
/seq checkseq checksum get def
|
|
163
|
+
/swidths seq 21 idiv 8 3 6 false getRSSwidths def
|
|
164
|
+
/bwidths seq 21 mod 8 3 6 false getRSSwidths def
|
|
165
|
+
|
|
166
|
+
/checkwidths [0 0 0 0 0 0 0 0 0 0 0 0 1 1] def
|
|
167
|
+
0 1 5 {
|
|
168
|
+
/i exch def
|
|
169
|
+
checkwidths i 2 mul swidths i get put
|
|
170
|
+
checkwidths i 2 mul 1 add bwidths i get put
|
|
171
|
+
} for
|
|
172
|
+
|
|
173
|
+
/sbs [
|
|
174
|
+
1 d1w {} forall checkwidths {} forall d2w {} forall 1 1
|
|
175
|
+
] def
|
|
176
|
+
|
|
177
|
+
% Return the arguments
|
|
178
|
+
/retval 8 dict def
|
|
179
|
+
retval (ren) (renlinear) put
|
|
180
|
+
retval (sbs) sbs put
|
|
181
|
+
retval (bhs) [sbs length 1 add 2 idiv {height} repeat] put
|
|
182
|
+
retval (bbs) [sbs length 1 add 2 idiv {0} repeat] put
|
|
183
|
+
retval (txt) txt put
|
|
184
|
+
retval (textxalign) (center) put
|
|
185
|
+
retval (opt) useropts put
|
|
186
|
+
retval
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
} bind def
|
|
191
|
+
/rsslimited load 0 1 dict put
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
% --DESC: Miscellaneous symbols
|
|
3
|
+
% --EXAM: fima
|
|
4
|
+
% --EXOP: backgroundcolor=DD000011
|
|
5
|
+
% --RNDR: renlinear
|
|
6
|
+
/symbol {
|
|
7
|
+
|
|
8
|
+
0 begin % Confine variables to local scope
|
|
9
|
+
|
|
10
|
+
/options exch def % We are given an option string
|
|
11
|
+
/barcode exch def % We are given a barcode string
|
|
12
|
+
|
|
13
|
+
barcode (fima) eq {
|
|
14
|
+
/sbs [2.25 2.25 2.25 11.25 2.25 11.25 2.25 2.25 2.25] def
|
|
15
|
+
/bhs [.625 .625 .625 .625 .625] def
|
|
16
|
+
/bbs [0 0 0 0 0] def
|
|
17
|
+
} if
|
|
18
|
+
|
|
19
|
+
barcode (fimb) eq {
|
|
20
|
+
/sbs [2.25 6.75 2.25 2.25 2.25 6.25 2.25 2.25 2.25 6.75 2.25] def
|
|
21
|
+
/bhs [.625 .625 .625 .625 .625 .625] def
|
|
22
|
+
/bbs [0 0 0 0 0 0] def
|
|
23
|
+
} if
|
|
24
|
+
|
|
25
|
+
barcode (fimc) eq {
|
|
26
|
+
/sbs [2.25 2.25 2.25 6.75 2.25 6.75 2.25 6.75 2.25 2.25 2.25] def
|
|
27
|
+
/bhs [.625 .625 .625 .625 .625 .625] def
|
|
28
|
+
/bbs [0 0 0 0 0 0] def
|
|
29
|
+
} if
|
|
30
|
+
|
|
31
|
+
barcode (fimd) eq {
|
|
32
|
+
/sbs [2.25 2.25 2.25 2.25 2.25 6.75 2.25 6.75 2.25 2.25 2.25 2.25 2.25] def
|
|
33
|
+
/bhs [.625 .625 .625 .625 .625 .625 .625] def
|
|
34
|
+
/bbs [0 0 0 0 0 0 0] def
|
|
35
|
+
} if
|
|
36
|
+
|
|
37
|
+
% Return the arguments
|
|
38
|
+
/retval 8 dict def
|
|
39
|
+
retval (ren) (renlinear) put
|
|
40
|
+
retval (sbs) sbs put
|
|
41
|
+
retval (bhs) bhs put
|
|
42
|
+
retval (bbs) bbs put
|
|
43
|
+
retval (opt) options put
|
|
44
|
+
retval
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
} bind def
|
|
49
|
+
/symbol load 0 1 dict put
|