rghost_barcode 0.8 → 0.9

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 (146) hide show
  1. data/lib/rghost_barcode.rb +7 -5
  2. data/lib/rghost_barcode/ps/barcode_base.ps +17090 -0
  3. data/lib/rghost_barcode/rghost_barcode_adapter.rb +22 -226
  4. data/lib/rghost_barcode/rghost_barcode_base.rb +12 -14
  5. data/lib/rghost_barcode/rghost_barcode_types.rb +86 -0
  6. data/lib/rghost_barcode/rghost_barcode_version.rb +2 -2
  7. metadata +30 -177
  8. data/lib/doc/classes/RGhost.html +0 -109
  9. data/lib/doc/classes/RGhost/Barcode.html +0 -147
  10. data/lib/doc/classes/RGhost/Barcode/Auspost.html +0 -113
  11. data/lib/doc/classes/RGhost/Barcode/Azteccode.html +0 -113
  12. data/lib/doc/classes/RGhost/Barcode/Base.html +0 -266
  13. data/lib/doc/classes/RGhost/Barcode/Base.src/M000004.html +0 -34
  14. data/lib/doc/classes/RGhost/Barcode/Base.src/M000005.html +0 -30
  15. data/lib/doc/classes/RGhost/Barcode/Base.src/M000006.html +0 -20
  16. data/lib/doc/classes/RGhost/Barcode/Border.html +0 -170
  17. data/lib/doc/classes/RGhost/Barcode/Border.src/M000001.html +0 -27
  18. data/lib/doc/classes/RGhost/Barcode/Code11.html +0 -113
  19. data/lib/doc/classes/RGhost/Barcode/Code128.html +0 -113
  20. data/lib/doc/classes/RGhost/Barcode/Code2of5.html +0 -113
  21. data/lib/doc/classes/RGhost/Barcode/Code39.html +0 -113
  22. data/lib/doc/classes/RGhost/Barcode/Code93.html +0 -113
  23. data/lib/doc/classes/RGhost/Barcode/Datamatrix.html +0 -113
  24. data/lib/doc/classes/RGhost/Barcode/Ean13.html +0 -113
  25. data/lib/doc/classes/RGhost/Barcode/Ean2.html +0 -113
  26. data/lib/doc/classes/RGhost/Barcode/Ean5.html +0 -113
  27. data/lib/doc/classes/RGhost/Barcode/Ean8.html +0 -113
  28. data/lib/doc/classes/RGhost/Barcode/Guard.html +0 -174
  29. data/lib/doc/classes/RGhost/Barcode/Guard.src/M000003.html +0 -27
  30. data/lib/doc/classes/RGhost/Barcode/Interleaved2of5.html +0 -113
  31. data/lib/doc/classes/RGhost/Barcode/Isbn.html +0 -113
  32. data/lib/doc/classes/RGhost/Barcode/Kix.html +0 -113
  33. data/lib/doc/classes/RGhost/Barcode/Maxicode.html +0 -113
  34. data/lib/doc/classes/RGhost/Barcode/Msi.html +0 -113
  35. data/lib/doc/classes/RGhost/Barcode/Onecode.html +0 -113
  36. data/lib/doc/classes/RGhost/Barcode/Parameter.html +0 -262
  37. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000007.html +0 -20
  38. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000008.html +0 -18
  39. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000009.html +0 -18
  40. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000010.html +0 -18
  41. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000011.html +0 -18
  42. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000012.html +0 -24
  43. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000013.html +0 -18
  44. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000014.html +0 -18
  45. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000015.html +0 -16
  46. data/lib/doc/classes/RGhost/Barcode/Pdf417.html +0 -113
  47. data/lib/doc/classes/RGhost/Barcode/Pharmacode.html +0 -113
  48. data/lib/doc/classes/RGhost/Barcode/Plessey.html +0 -113
  49. data/lib/doc/classes/RGhost/Barcode/Postnet.html +0 -113
  50. data/lib/doc/classes/RGhost/Barcode/Qrcode.html +0 -113
  51. data/lib/doc/classes/RGhost/Barcode/Rationalizedcodabar.html +0 -113
  52. data/lib/doc/classes/RGhost/Barcode/Raw.html +0 -113
  53. data/lib/doc/classes/RGhost/Barcode/Royalmail.html +0 -113
  54. data/lib/doc/classes/RGhost/Barcode/Rss14.html +0 -113
  55. data/lib/doc/classes/RGhost/Barcode/Rssexpanded.html +0 -113
  56. data/lib/doc/classes/RGhost/Barcode/Rsslimited.html +0 -113
  57. data/lib/doc/classes/RGhost/Barcode/Symbol.html +0 -113
  58. data/lib/doc/classes/RGhost/Barcode/Text.html +0 -193
  59. data/lib/doc/classes/RGhost/Barcode/Text.src/M000002.html +0 -30
  60. data/lib/doc/classes/RGhost/Barcode/Upca.html +0 -113
  61. data/lib/doc/classes/RGhost/Barcode/Upce.html +0 -113
  62. data/lib/doc/classes/RGhost/Config.html +0 -150
  63. data/lib/doc/classes/RGhost/Config.src/M000016.html +0 -45
  64. data/lib/doc/classes/RGhost/Document.html +0 -704
  65. data/lib/doc/classes/RGhost/Document.src/M000017.html +0 -19
  66. data/lib/doc/classes/RGhost/Document.src/M000018.html +0 -18
  67. data/lib/doc/classes/RGhost/Document.src/M000019.html +0 -18
  68. data/lib/doc/classes/RGhost/Document.src/M000020.html +0 -18
  69. data/lib/doc/classes/RGhost/Document.src/M000021.html +0 -18
  70. data/lib/doc/classes/RGhost/Document.src/M000022.html +0 -18
  71. data/lib/doc/classes/RGhost/Document.src/M000023.html +0 -18
  72. data/lib/doc/classes/RGhost/Document.src/M000024.html +0 -18
  73. data/lib/doc/classes/RGhost/Document.src/M000025.html +0 -18
  74. data/lib/doc/classes/RGhost/Document.src/M000026.html +0 -18
  75. data/lib/doc/classes/RGhost/Document.src/M000027.html +0 -18
  76. data/lib/doc/classes/RGhost/Document.src/M000028.html +0 -18
  77. data/lib/doc/classes/RGhost/Document.src/M000029.html +0 -18
  78. data/lib/doc/classes/RGhost/Document.src/M000030.html +0 -18
  79. data/lib/doc/classes/RGhost/Document.src/M000031.html +0 -18
  80. data/lib/doc/classes/RGhost/Document.src/M000032.html +0 -18
  81. data/lib/doc/classes/RGhost/Document.src/M000033.html +0 -18
  82. data/lib/doc/classes/RGhost/Document.src/M000034.html +0 -18
  83. data/lib/doc/classes/RGhost/Document.src/M000035.html +0 -18
  84. data/lib/doc/classes/RGhost/Document.src/M000036.html +0 -18
  85. data/lib/doc/classes/RGhost/Document.src/M000037.html +0 -18
  86. data/lib/doc/classes/RGhost/Document.src/M000038.html +0 -18
  87. data/lib/doc/classes/RGhost/Document.src/M000039.html +0 -18
  88. data/lib/doc/classes/RGhost/Document.src/M000040.html +0 -18
  89. data/lib/doc/classes/RGhost/Document.src/M000041.html +0 -18
  90. data/lib/doc/classes/RGhost/Document.src/M000042.html +0 -18
  91. data/lib/doc/classes/RGhost/Document.src/M000043.html +0 -18
  92. data/lib/doc/classes/RGhost/Document.src/M000044.html +0 -18
  93. data/lib/doc/classes/RGhost/Document.src/M000045.html +0 -18
  94. data/lib/doc/classes/RGhost/Document.src/M000046.html +0 -18
  95. data/lib/doc/classes/RGhost/Document.src/M000047.html +0 -18
  96. data/lib/doc/classes/RGhost/Document.src/M000048.html +0 -18
  97. data/lib/doc/created.rid +0 -1
  98. data/lib/doc/files/rghost_barcode/rghost_barcode_adapter_rb.html +0 -101
  99. data/lib/doc/files/rghost_barcode/rghost_barcode_base_rb.html +0 -101
  100. data/lib/doc/files/rghost_barcode/rghost_barcode_classes_rb.html +0 -101
  101. data/lib/doc/files/rghost_barcode/rghost_barcode_examples_rb.html +0 -101
  102. data/lib/doc/files/rghost_barcode/rghost_barcode_version_rb.html +0 -101
  103. data/lib/doc/files/rghost_barcode_rb.html +0 -111
  104. data/lib/doc/files/teste_main_rb.html +0 -110
  105. data/lib/doc/fr_class_index.html +0 -67
  106. data/lib/doc/fr_file_index.html +0 -33
  107. data/lib/doc/fr_method_index.html +0 -74
  108. data/lib/doc/index.html +0 -24
  109. data/lib/rghost_barcode/ps/auspost.ps +0 -192
  110. data/lib/rghost_barcode/ps/azteccode.ps +0 -357
  111. data/lib/rghost_barcode/ps/barcode_template.eps +0 -1193
  112. data/lib/rghost_barcode/ps/code11.ps +0 -128
  113. data/lib/rghost_barcode/ps/code128.ps +0 -121
  114. data/lib/rghost_barcode/ps/code2of5.ps +0 -106
  115. data/lib/rghost_barcode/ps/code39.ps +0 -109
  116. data/lib/rghost_barcode/ps/code93.ps +0 -117
  117. data/lib/rghost_barcode/ps/datamatrix.ps +0 -328
  118. data/lib/rghost_barcode/ps/ean13.ps +0 -183
  119. data/lib/rghost_barcode/ps/ean2.ps +0 -101
  120. data/lib/rghost_barcode/ps/ean5.ps +0 -116
  121. data/lib/rghost_barcode/ps/ean8.ps +0 -101
  122. data/lib/rghost_barcode/ps/interleaved2of5.ps +0 -132
  123. data/lib/rghost_barcode/ps/isbn.ps +0 -118
  124. data/lib/rghost_barcode/ps/kix.ps +0 -98
  125. data/lib/rghost_barcode/ps/maxicode.ps +0 -307
  126. data/lib/rghost_barcode/ps/msi.ps +0 -104
  127. data/lib/rghost_barcode/ps/onecode.ps +0 -276
  128. data/lib/rghost_barcode/ps/pdf417.ps +0 -428
  129. data/lib/rghost_barcode/ps/pharmacode.ps +0 -69
  130. data/lib/rghost_barcode/ps/plessey.ps +0 -121
  131. data/lib/rghost_barcode/ps/postnet.ps +0 -114
  132. data/lib/rghost_barcode/ps/qrcode.ps +0 -530
  133. data/lib/rghost_barcode/ps/rationalizedcodabar.ps +0 -117
  134. data/lib/rghost_barcode/ps/raw.ps +0 -35
  135. data/lib/rghost_barcode/ps/render.ps +0 -307
  136. data/lib/rghost_barcode/ps/render.ps~ +0 -308
  137. data/lib/rghost_barcode/ps/royalmail.ps +0 -119
  138. data/lib/rghost_barcode/ps/rss14.ps +0 -237
  139. data/lib/rghost_barcode/ps/rssexpanded.ps +0 -211
  140. data/lib/rghost_barcode/ps/rsslimited.ps +0 -191
  141. data/lib/rghost_barcode/ps/symbol.ps +0 -49
  142. data/lib/rghost_barcode/ps/upca.ps +0 -128
  143. data/lib/rghost_barcode/ps/upce.ps +0 -157
  144. data/lib/rghost_barcode/rghost_barcode_classes.rb +0 -96
  145. data/lib/rghost_barcode/rghost_barcode_examples.rb +0 -35
  146. data/lib/teste_main.rb +0 -94
@@ -1,128 +0,0 @@
1
-
2
- % --DESC: UPC-A
3
- % --EXAM: 78858101497
4
- % --EXOP: includetext
5
- % --RNDR: renlinear
6
- /upca {
7
-
8
- 0 begin
9
-
10
- /options exch def
11
- /useropts options def
12
- /barcode exch def % We are given a barcode string
13
-
14
- /includetext false def % Enable/disable text
15
- /textfont /Helvetica def
16
- /textsize 12 def
17
- /textyoffset -4 def
18
- /height 1 def
19
-
20
- % Parse the input options
21
- options {
22
- token false eq {exit} if dup length string cvs (=) search
23
- true eq {cvlit exch pop exch def} {cvlit true def} ifelse
24
- } loop
25
-
26
- /textfont textfont cvlit def
27
- /textsize textsize cvr def
28
- /textyoffset textyoffset cvr def
29
- /height height cvr def
30
-
31
- /barlen barcode length def % Length of the code
32
-
33
- % Add checksum digit to barcode if length is odd
34
- barlen 2 mod 0 ne {
35
- /pad barlen 1 add string def % Create pad one bigger than barcode
36
- /checksum 0 def
37
- 0 1 barlen 1 sub {
38
- /i exch def
39
- /barchar barcode i get 48 sub def
40
- i 2 mod 0 ne {
41
- /checksum checksum barchar add def
42
- } {
43
- /checksum checksum barchar 3 mul add def
44
- } ifelse
45
- } for
46
- /checksum 10 checksum 10 mod sub 10 mod def
47
- pad 0 barcode putinterval % Add barcode to the start of the pad
48
- pad barlen checksum 48 add put % Put ascii for checksum at end of pad
49
- /barcode pad def % barcode=pad
50
- /barlen barlen 1 add def % barlen++
51
- } if
52
-
53
- % Create an array containing the character mappings
54
- /encs
55
- [ (3211) (2221) (2122) (1411) (1132)
56
- (1231) (1114) (1312) (1213) (3112)
57
- (111) (11111) (111)
58
- ] def
59
-
60
- % Create a string of the available characters
61
- /barchars (0123456789) def
62
-
63
- /sbs barlen 4 mul 11 add string def
64
- /txt barlen array def
65
-
66
- % Put the start character
67
- sbs 0 encs 10 get putinterval
68
-
69
- % Left side
70
- 0 1 5 {
71
- % Lookup the encoding for the each barcode character
72
- /i exch def
73
- barcode i 1 getinterval barchars exch search
74
- pop % Discard true leaving pre
75
- length /indx exch def % indx is the length of pre
76
- pop pop % Discard seek and post
77
- /enc encs indx get def % Get the indxth encoding
78
- sbs i 4 mul 3 add enc putinterval % Put encoded digit into sbs
79
- i 0 eq { % First digit is before the guard bars
80
- txt 0 [barcode 0 1 getinterval -7 textyoffset textfont textsize 2 sub] put
81
- } {
82
- txt i [barcode i 1 getinterval i 7 mul 4 add textyoffset textfont textsize] put
83
- } ifelse
84
- } for
85
-
86
- % Put the middle character
87
- sbs 6 4 mul 3 add encs 11 get putinterval
88
-
89
- % Right side
90
- 6 1 11 {
91
- % Lookup the encoding for the each barcode character
92
- /i exch def
93
- barcode i 1 getinterval barchars exch search
94
- pop % Discard true leaving pre
95
- length /indx exch def % indx is the length of pre
96
- pop pop % Discard seek and post
97
- /enc encs indx get def % Get the indxth encoding
98
- sbs i 4 mul 8 add enc putinterval % Put encoded digit into sbs
99
- i 11 eq { % Last digit is after guard bars
100
- txt 11 [barcode 11 1 getinterval 96 textyoffset textfont textsize 2 sub] put
101
- } {
102
- txt i [barcode i 1 getinterval i 7 mul 8 add textyoffset textfont textsize] put
103
- } ifelse
104
- } for
105
-
106
- % Put the end character
107
- sbs barlen 4 mul 8 add encs 12 get putinterval
108
-
109
- % Return the arguments
110
- /retval 8 dict def
111
- retval (ren) (renlinear) put
112
- retval (sbs) [sbs {48 sub} forall] put
113
- includetext {
114
- retval (bhs) [4{height}repeat 10{height .075 sub}repeat height height 10{height .075 sub}repeat 5{height}repeat] put
115
- retval (bbs) [0 0 0 0 10{.075}repeat 0 0 10{.075}repeat 0 0 0 0 0] put
116
- retval (txt) txt put
117
- } {
118
- retval (bhs) [31{height}repeat] put
119
- retval (bbs) [31{0}repeat] put
120
- } ifelse
121
- retval (opt) useropts put
122
- retval (borderbottom) 5 put
123
- retval
124
-
125
- end
126
-
127
- } bind def
128
- /upca load 0 1 dict put
@@ -1,157 +0,0 @@
1
-
2
- % --DESC: UPC-E
3
- % --EXAM: 0123456
4
- % --EXOP: includetext height=0.4
5
- % --RNDR: renlinear
6
- /upce {
7
-
8
- 0 begin
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
- /includetext false def % Enable/disable text
15
- /textfont /Helvetica def
16
- /textsize 12 def
17
- /textyoffset -4 def
18
- /height 1 def
19
-
20
- % Parse the input options
21
- options {
22
- token false eq {exit} if dup length string cvs (=) search
23
- true eq {cvlit exch pop exch def} {cvlit true def} ifelse
24
- } loop
25
-
26
- /textfont textfont cvlit def
27
- /textsize textsize cvr def
28
- /textyoffset textyoffset cvr def
29
- /height height cvr def
30
-
31
- /barlen barcode length def % Length of the code
32
-
33
- % Create an array containing the character mappings
34
- /encs
35
- [ (3211) (2221) (2122) (1411) (1132)
36
- (1231) (1114) (1312) (1213) (3112)
37
- (111) (1111111)
38
- ] def
39
-
40
- % Create a string of the available characters
41
- /barchars (0123456789) def
42
-
43
- /mirrormaps
44
- [ (000111) (001011) (001101) (001110) (010011)
45
- (011001) (011100) (010101) (010110) (011010)
46
- ] def
47
-
48
- % Add checksum digit to barcode if length is odd
49
- barlen 2 mod 0 ne {
50
- % Derive the equivalent UPC-A for its checksum
51
- /upcacode (00000000000) 11 string copy def
52
- barcode 6 get 48 sub 2 le {
53
- upcacode 1 barcode 1 2 getinterval putinterval
54
- upcacode 3 barcode 6 1 getinterval putinterval
55
- upcacode 8 barcode 3 3 getinterval putinterval
56
- } if
57
- barcode 6 get 48 sub 3 eq {
58
- upcacode 1 barcode 1 3 getinterval putinterval
59
- upcacode 9 barcode 4 2 getinterval putinterval
60
- } if
61
- barcode 6 get 48 sub 4 eq {
62
- upcacode 1 barcode 1 4 getinterval putinterval
63
- upcacode 10 barcode 5 1 getinterval putinterval
64
- } if
65
- barcode 6 get 48 sub 5 ge {
66
- upcacode 1 barcode 1 5 getinterval putinterval
67
- upcacode 10 barcode 6 1 getinterval putinterval
68
- } if
69
- /checksum 0 def
70
- 0 1 10 {
71
- /i exch def
72
- /barchar upcacode i get 48 sub def
73
- i 2 mod 0 ne {
74
- /checksum checksum barchar add def
75
- } {
76
- /checksum checksum barchar 3 mul add def
77
- } ifelse
78
- } for
79
- /checksum 10 checksum 10 mod sub 10 mod def
80
- /pad barlen 1 add string def % Create pad one bigger than barcode
81
- pad 0 barcode putinterval % Add barcode to the start of the pad
82
- pad barlen checksum 48 add put % Put ascii for checksum at end of pad
83
- /barcode pad def % barcode=pad
84
- /barlen barlen 1 add def % barlen++
85
- } if
86
- /txt barlen array def
87
- txt 0 [barcode 0 1 getinterval -7 textyoffset textfont textsize 2 sub] put
88
-
89
- % Determine the mirror map based on checksum
90
- /mirrormap mirrormaps barcode barlen 1 sub get 48 sub get def
91
-
92
- % Invert the mirrormap if we are using a non-zero number system
93
- barcode 0 get 48 eq {
94
- /invt mirrormap length string def
95
- 0 1 mirrormap length 1 sub {
96
- /i exch def
97
- mirrormap i get 48 eq {
98
- invt i 49 put
99
- } {
100
- invt i 48 put
101
- } ifelse
102
- } for
103
- /mirrormap invt def
104
- } if
105
-
106
- /sbs barlen 2 sub 4 mul 10 add string def
107
-
108
- % Put the start character
109
- sbs 0 encs 10 get putinterval
110
-
111
- 1 1 6 {
112
- /i exch def
113
- % Lookup the encoding for the each barcode character
114
- barcode i 1 getinterval barchars exch search
115
- pop % Discard true leaving pre
116
- length /indx exch def % indx is the length of pre
117
- pop pop % Discard seek and post
118
- /enc encs indx get def % Get the indxth encoding
119
- mirrormap i 1 sub get 49 eq { % Reverse enc if 1 in this position in mirrormap
120
- /enclen enc length def
121
- /revenc enclen string def
122
- 0 1 enclen 1 sub {
123
- /j exch def
124
- /char enc j get def
125
- revenc enclen j sub 1 sub char put
126
- } for
127
- /enc revenc def
128
- } if
129
- sbs i 1 sub 4 mul 3 add enc putinterval % Put encoded digit into sbs
130
- txt i [barcode i 1 getinterval i 1 sub 7 mul 4 add textyoffset textfont textsize] put
131
- } for
132
-
133
- txt 7 [barcode 7 1 getinterval 6 7 mul 11 add textyoffset textfont textsize 2 sub] put
134
-
135
- % Put the end character
136
- sbs barlen 2 sub 4 mul 3 add encs 11 get putinterval
137
-
138
- % Return the arguments
139
- /retval 8 dict def
140
- retval (ren) (renlinear) put
141
- retval (sbs) [sbs {48 sub} forall] put
142
- includetext {
143
- retval (bhs) [height height 12{height .075 sub}repeat height height height] put
144
- retval (bbs) [0 0 12{.075}repeat 0 0 0] put
145
- retval (txt) txt put
146
- } {
147
- retval (bhs) [17{height}repeat] put
148
- retval (bbs) [17{0}repeat] put
149
- } ifelse
150
- retval (opt) useropts put
151
- retval (borderbottom) 5 put
152
- retval
153
-
154
- end
155
-
156
- } bind def
157
- /upce load 0 1 dict put
@@ -1,96 +0,0 @@
1
- class RGhost::Barcode::Auspost < RGhost::Barcode::Base
2
-
3
- end
4
- class RGhost::Barcode::Azteccode < RGhost::Barcode::Base
5
-
6
- end
7
- class RGhost::Barcode::Code11 < RGhost::Barcode::Base
8
-
9
- end
10
- class RGhost::Barcode::Code128 < RGhost::Barcode::Base
11
-
12
- end
13
- class RGhost::Barcode::Code2of5 < RGhost::Barcode::Base
14
-
15
- end
16
- class RGhost::Barcode::Code39 < RGhost::Barcode::Base
17
-
18
- end
19
- class RGhost::Barcode::Code93 < RGhost::Barcode::Base
20
-
21
- end
22
- class RGhost::Barcode::Datamatrix < RGhost::Barcode::Base
23
-
24
- end
25
- class RGhost::Barcode::Ean13 < RGhost::Barcode::Base
26
-
27
- end
28
- class RGhost::Barcode::Ean2 < RGhost::Barcode::Base
29
-
30
- end
31
- class RGhost::Barcode::Ean5 < RGhost::Barcode::Base
32
-
33
- end
34
- class RGhost::Barcode::Ean8 < RGhost::Barcode::Base
35
-
36
- end
37
- class RGhost::Barcode::Interleaved2of5 < RGhost::Barcode::Base
38
-
39
- end
40
- class RGhost::Barcode::Isbn < RGhost::Barcode::Base
41
-
42
- end
43
- class RGhost::Barcode::Kix < RGhost::Barcode::Base
44
-
45
- end
46
- class RGhost::Barcode::Maxicode < RGhost::Barcode::Base
47
-
48
- end
49
- class RGhost::Barcode::Msi < RGhost::Barcode::Base
50
-
51
- end
52
- class RGhost::Barcode::Onecode < RGhost::Barcode::Base
53
-
54
- end
55
- class RGhost::Barcode::Pdf417 < RGhost::Barcode::Base
56
-
57
- end
58
- class RGhost::Barcode::Pharmacode < RGhost::Barcode::Base
59
-
60
- end
61
- class RGhost::Barcode::Plessey < RGhost::Barcode::Base
62
-
63
- end
64
- class RGhost::Barcode::Postnet < RGhost::Barcode::Base
65
-
66
- end
67
- class RGhost::Barcode::Qrcode < RGhost::Barcode::Base
68
-
69
- end
70
- class RGhost::Barcode::Rationalizedcodabar < RGhost::Barcode::Base
71
-
72
- end
73
- class RGhost::Barcode::Raw < RGhost::Barcode::Base
74
-
75
- end
76
- class RGhost::Barcode::Royalmail < RGhost::Barcode::Base
77
-
78
- end
79
- class RGhost::Barcode::Rss14 < RGhost::Barcode::Base
80
-
81
- end
82
- class RGhost::Barcode::Rssexpanded < RGhost::Barcode::Base
83
-
84
- end
85
- class RGhost::Barcode::Rsslimited < RGhost::Barcode::Base
86
-
87
- end
88
- class RGhost::Barcode::Symbol < RGhost::Barcode::Base
89
-
90
- end
91
- class RGhost::Barcode::Upca < RGhost::Barcode::Base
92
-
93
- end
94
- class RGhost::Barcode::Upce < RGhost::Barcode::Base
95
-
96
- end
@@ -1,35 +0,0 @@
1
- @codes={
2
- 'plessey' => ['01234ABCD',{}],
3
- 'isbn' => ['978-1-56592-479',{:guard=> {:whitespace => true}}],
4
- 'rsslimited' => ['00978186074271',{:format => 1}],
5
- 'pdf417' => ['^453^178^121^239',{:columns => 2, :rows=> 10}],
6
- 'royalmail' => ['LE28HS9Z',{}],
7
- 'ean13' => ['977147396801',{:guard=> {:whitespace => true}}],
8
- 'code11' => ['0123456789',{}],
9
- 'symbol' => ['fima',{}],
10
- 'qrcode' => ['000100000010000000001100010101100110000110000',{}],
11
- 'msi' => ['0123456789',{}],
12
- 'upca' => ['78858101497',{}],
13
- 'pharmacode' => ['117480',{}],
14
- 'kix' => ['1231FZ13XHS',{}],
15
- 'datamatrix' => ['^142^164^186',{}],
16
- 'rssexpanded' => ['000000010011001010100001000000010000',{}],
17
- 'ean2' => ['05',{}],
18
- 'rationalizedcodabar' => ['A0123456789B',{}],
19
- 'upce' => ['0123456',{}],
20
- 'ean5' => ['90200',{}],
21
- 'code2of5' => ['01234567',{}],
22
- 'code93' => ['THIS IS CODE 93',{}],
23
- 'postnet' => ['012345',{}],
24
- 'maxicode' => ['^059^042^041^059^040^03001^02996152382802^029840^029001^0291Z00004951^029UPSN^02906X610^029159^0291234567^0291^0471^029^029Y^029634 ALPHA DR^029PITTSBURGH^029PA^030^062^004^063', {:mode=> 2}],
25
- 'raw' => ['331132131313411122131311333213114131131221323',{}],
26
- 'onecode' => ['0123456709498765432101234567891',{}],
27
- 'code39' => ['THIS IS CODE 39',{}],
28
- 'auspost' => ['5956439111ABA 9',{}],
29
- 'azteccode' => ['00100111001000000101001101111000010100111100101000000110',{:fofrmat=> :compact}],
30
- 'ean8' => ['01335583',{}],
31
- 'interleaved2of5' => ['24012345678905',{}],
32
- 'code128' => ['^104^102Count^0990123456789^101!',{}],
33
- 'rss14' => ['24012345678905',{}]
34
-
35
- }
@@ -1,94 +0,0 @@
1
- require 'rubygems'
2
-
3
- require 'rghost_barcode'
4
-
5
-
6
- #puts RGhost::Barcode::Text.new(:size => 10, :font => "Courier", :offset => [0,0], :x => 0, :y => 0, :color => '#000000', :enable => [:text, :check, :checkintext]).inspect
7
- #puts RGhost::Barcode::Guard.new( :height => 1, :width => 10, :left=>3, :right => 4, :left_y => 5, :right_y => 6 ).inspect
8
- #puts RGhost::Barcode::Border.new( :width => 1, :top => 0, :right => 0, :bottom => 0, :left => 0, :color => '#000000' ).inspect
9
-
10
- p={:text => { :size => 10, :font => "Courier", :offset => [0,0], :x => 0, :y => 0, :color => '#000000', :enable => [:text, :check, :checkintext]},
11
- :guard => { :height => 1, :width => 10, :left=>3, :right => 4, :left_y => 5, :right_y => 6 },
12
- :border =>{ :width => 1, :top => 0, :right => 0, :bottom => 0, :left => 0, :color => '#000000'},
13
- :height => 1, :width => 10,
14
- :color => '000000', :background => 'FFFFFF',
15
- :x => :limit_left, :y => :current_row,
16
- :inkspread => 0.5
17
- }
18
-
19
-
20
- #puts RGhost::Barcode::Interleaved2of5.new("KJAHDFJASHDFAKSJDFASD",p).ps
21
-
22
- #d=RGhost::Document.new :paper => [15,8], :margin_left => 2
23
- ##d.set RGhost::Barcode::Code39.new("ASDHAJSDF", :x => 1, :y => 5, :color => 'FF0000', :border =>{:color => '00FF00'}, :text =>{:size => 10, :color => '553297' }, :height => 1, :width => 4.545)
24
- ##d.barcode_isbn("978-1-56592-479", :x => 1, :y => 5, :color => 'FF0000', :border =>{:color => '00FF00'}, :text =>{:size => 10, :color => '553297' }, :height => 1, :width => 4.545)
25
- ##d.barcode_isbn("978-1-56592-479", :x => 1, :y => 10, :text =>{:size => 10})
26
- #d.define_template :barcode_template, File.join(File.dirname(__FILE__),'ps',"barcode_template.eps")
27
- #d.before_page_create do
28
- # use_template :barcode_template
29
- #end
30
- #@codes.each do |k,v|
31
- #
32
- # #d.rotate 90
33
- # d.show "Barcode Name: #{k}"
34
- #
35
- # d.jump_rows 7
36
- #
37
- # opt=v[1].merge( :text => {:size => 10})
38
- # #d.translate :x => 2
39
- # d.send "barcode_#{k}".to_sym,v[0],opt.dup
40
- # #d.translate :x => -2
41
- # d.jump_rows 2
42
- # d.show "Code String: #{v[0]}"
43
- # d.next_row
44
- # d.show "Options: #{opt.inspect}"
45
- # d.next_page
46
- #end
47
- #text=%Q{
48
- #<big>Barcode Writer License</big><br/>
49
- #Anybody is free to use and develop this code as they see fit, under the terms of the permissive MIT/X-Consortium license(http://postscriptbarcode.googlecode.com/svn/trunk/LICENSE), which requires that developers attribute any derivative code to this project in both the source code and documentation. As such I take no liability for its use or misuse.<br/><br/>Thanks a lot Terry!<br/> <i>Shairon Toledo</i>
50
- #
51
- #}
52
- #d.text text
53
-
54
- f="/tmp/fonte#{rand*100}.pdf"
55
- RGhost::Config.barcode_examples.render :pdf, :filename => "/tmp/rghost_barcode_catalog.pdf", :debug => true, :logfile => '/tmp/teste.txt'
56
- exit
57
- include RGhost
58
- doc=Document.new :paper => [10.8,4], :margin => 0.3
59
- doc.jump_rows 5
60
- #doc.barcode_datamatrix '^142^164^186',:columns => 32, :rows=> 32
61
- #doc.barcode_pdf417 '^453^178^121^239', :columns => 2, :rows=> 10
62
- #doc.barcode_interleaved2of5 '24012345678905',:text => {:size => 10, :offset => [0,-10], :enable => [:text, :check, :checkintext] }
63
- #doc.barcode_interleaved2of5 '24012345678905',:rotate => 90, :x => 4,
64
- # :text => {
65
- # :size => 10,
66
- # :offset => [0,-10],
67
- # :enable => [:text, :check, :checkintext]
68
- #
69
- #}
70
- #doc.barcode_code39 'THIS IS CODE 39',:text => {:size => 10, :enable=>[:check] }
71
-
72
- f="/local/junk/bc/f5.png"
73
- #doc.render :png, :filename => f, :resolution => 120
74
- =begin
75
- 'code11' => ['0123456789',{:text => {:size => 10}}],
76
- 'symbol' => ['fima',{:text => {:size => 10}}],
77
- 'qrcode' => ['000100000010000000001100010101100110000110000',{:text => {:size => 10}}],
78
- =end
79
- #RGhost::Config::GS[:extensions] << "/tmp/foo"
80
-
81
- #RGhost::Config.environment_fonts.render :pdf, :filename => 'mycatalog.pdf'
82
-
83
-
84
- `evince #{f}`
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-