label_factory 1.0.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.
@@ -0,0 +1,47 @@
1
+ require 'pdf/writer'
2
+ require 'xml/mapping'
3
+ require 'xml/mapping/base'
4
+
5
+ module LabelFactory
6
+
7
+ Encoding.default_external = Encoding::UTF_8
8
+ Encoding.default_internal = Encoding::UTF_8
9
+
10
+ LIBRARY_PATH = File.join(File.dirname(__FILE__), 'label_factory')
11
+ BATCH_PATH = File.join(LIBRARY_PATH, 'batch')
12
+ LABEL_PATH = File.join(LIBRARY_PATH, 'label')
13
+ LAYOUT_PATH = File.join(LIBRARY_PATH, 'layout')
14
+ TEMPLATE_PATH = File.join(LIBRARY_PATH, 'template')
15
+ UTIL_PATH = File.join(LIBRARY_PATH, 'util')
16
+ TEMPLATES_PATH = File.expand_path('../../templates', __FILE__)
17
+
18
+ module Batch
19
+ autoload :Base, File.join(BATCH_PATH, 'base')
20
+ end
21
+
22
+ module Template
23
+ autoload :Base, File.join(TEMPLATE_PATH, 'base')
24
+ autoload :Glabel, File.join(TEMPLATE_PATH, 'glabel')
25
+ end
26
+
27
+ module Label
28
+ autoload :Base, File.join(LABEL_PATH, 'base')
29
+ autoload :Alias, File.join(LABEL_PATH, 'alias')
30
+ autoload :Cd, File.join(LABEL_PATH, 'cd')
31
+ autoload :Round, File.join(LABEL_PATH, 'round')
32
+ autoload :Rectangle, File.join(LABEL_PATH, 'rectangle')
33
+ end
34
+
35
+ module Layout
36
+ autoload :Base, File.join(LAYOUT_PATH, 'Base')
37
+ autoload :Margin, File.join(LAYOUT_PATH, 'margin')
38
+ autoload :Line, File.join(LAYOUT_PATH, 'line')
39
+ autoload :Circle, File.join(LAYOUT_PATH, 'circle')
40
+ autoload :Length, File.join(LAYOUT_PATH, 'length')
41
+ end
42
+
43
+
44
+ require File.join(LIBRARY_PATH, 'version')
45
+ require File.join(UTIL_PATH, 'length_node')
46
+
47
+ end
@@ -0,0 +1,222 @@
1
+ <?xml version="1.0"?>
2
+ <Glabels-templates>
3
+
4
+
5
+ <!-- ******************************************************************** -->
6
+ <!-- Avery A4 products (and look-alikes) -->
7
+ <!-- ******************************************************************** -->
8
+
9
+ <!-- =================================================================== -->
10
+ <!-- Avery 7160 family: Mailing labels, 63.5 x 38.1 mm, 21 per sheet -->
11
+ <!-- =================================================================== -->
12
+ <Template name="Avery 7160" size="A4" _description="Mailing labels">
13
+ <Label-rectangle id="0" width="181.4" height="108.0" round="5">
14
+ <Markup-margin size="5"/>
15
+ <Layout nx="3" ny="7" x0="21.2" y0="43.9" dx="187.2" dy="108.0"/>
16
+ </Label-rectangle>
17
+ <Alias name="Avery L7160"/>
18
+ <Alias name="Avery J8160"/>
19
+ <Alias name="DECAdry DLW-1731"/>
20
+ <Alias name="DECAdry OLW-4731"/>
21
+ <Alias name="DECAdry OLW-7131"/>
22
+ </Template>
23
+
24
+ <!-- =================================================================== -->
25
+ <!-- Avery 7161 family: Mailing labels, 63.5 x 46.6 mm, 18 per sheet -->
26
+ <!-- =================================================================== -->
27
+ <Template name="Avery 7161" size="A4" _description="Mailing labels">
28
+ <Label-rectangle id="0" width="180.2" height="132.6" round="7">
29
+ <Markup-margin size="5"/>
30
+ <Layout nx="3" ny="6" x0="21" y0="23" dx="186.9" dy="132.5"/>
31
+ </Label-rectangle>
32
+ <Alias name="Avery L7161"/>
33
+ <Alias name="Avery J8161"/>
34
+ </Template>
35
+
36
+ <!-- ================================================================== -->
37
+ <!-- Avery 7162 family: Mailing labels, 99.1 x 33.9 mm, 16 per sheet -->
38
+ <!-- ================================================================== -->
39
+ <Template name="Avery 7162" size="A4" _description="Mailing labels">
40
+ <Label-rectangle id="0" width="280.9" height="96.1" round="5">
41
+ <Markup-margin size="5"/>
42
+ <Layout nx="2" ny="8" x0="11.3" y0="36.8" dx="290.5" dy="96.1"/>
43
+ </Label-rectangle>
44
+ <Alias name="Avery L7162"/>
45
+ </Template>
46
+
47
+ <!-- =================================================================== -->
48
+ <!-- Avery 7163 family: Mailing labels, 99.1 x 38.1 mm, 14 per sheet -->
49
+ <!-- =================================================================== -->
50
+ <Template name="Avery 7163" size="A4" _description="Mailing labels">
51
+ <Label-rectangle id="0" width="280.9" height="108" round="5">
52
+ <Markup-margin size="5"/>
53
+ <Layout nx="2" ny="7" x0="9.5" y0="43" dx="292" dy="108"/>
54
+ </Label-rectangle>
55
+ <Alias name="Avery L7163"/>
56
+ </Template>
57
+
58
+ <!-- =================================================================== -->
59
+ <!-- Avery 7164 family: Address labels, 63.50 x 71.98 mm, 12 per sheet -->
60
+ <!-- =================================================================== -->
61
+ <Template name="Avery 7164" size="A4" _description="Address labels">
62
+ <Label-rectangle id="0" width="180" height="204.038" round="8.5">
63
+ <Markup-margin size="5"/>
64
+ <Layout nx="3" ny="4" x0="20.84" y0="10" dx="187.08" dy="204.038"/>
65
+ </Label-rectangle>
66
+ <Alias name="Avery J8164"/>
67
+ <Alias name="Avery L7164"/>
68
+ <Alias name="Biltema 23-756"/>
69
+ </Template>
70
+
71
+ <!-- =================================================================== -->
72
+ <!-- Avery 7165 family: Address labels -->
73
+ <!-- =================================================================== -->
74
+ <Template name="Avery 7165" size="A4" description="Address Labels">
75
+ <Label-rectangle id="0" width="280.8pt" height="191.991pt" round="0pt" waste="0pt">
76
+ <Markup-margin size="5.66929pt"/>
77
+ <Layout nx="2" ny="4" x0="13.2378pt" y0="36.9638pt" dx="288.113pt" dy="191.991pt"/>
78
+ </Label-rectangle>
79
+ <Alias name="Avery J8165"/>
80
+ <Alias name="Avery L7165"/>
81
+ </Template>
82
+
83
+ <!-- =================================================================== -->
84
+ <!-- Avery 7169 family: shipping labels, 99.1 x 139.0 mm, 4 per sheet -->
85
+ <!-- =================================================================== -->
86
+ <Template name="Avery 7169" size="A4" _description="Shipping labels">
87
+ <Label-rectangle id="0" width="280.9" height="394.0" round="6">
88
+ <Markup-margin size="6"/>
89
+ <Layout nx="2" ny="2" x0="14.2" y0="20.0" dx="287.7" dy="394.0"/>
90
+ </Label-rectangle>
91
+ <Alias name="Avery L7169"/>
92
+ </Template>
93
+
94
+ <!-- =================================================================== -->
95
+ <!-- Avery 7414 family: Business Cards, 52mm x 90mm, 10 per sheet -->
96
+ <!-- =================================================================== -->
97
+ <Template name="Avery 7414" size="A4" _description="Business Cards">
98
+ <Label-rectangle id="0" width="255.1" height="147.4" round="0">
99
+ <Markup-margin size="5"/>
100
+ <Layout nx="2" ny="5" x0="42.51" y0="52.44" dx="255.1" dy="147.4"/>
101
+ </Label-rectangle>
102
+ <Alias name="Avery L7414"/>
103
+ </Template>
104
+
105
+ <!-- =================================================================== -->
106
+ <!-- Avery 7664 family: Diskette Labels, 70mm x 71.9 mm, 8 per sheet -->
107
+ <!-- =================================================================== -->
108
+ <Template name="Avery 7664" size="A4" description="Diskette Labels">
109
+ <Label-rectangle id="0" width="70mm" height="71.9mm" round="2.5mm">
110
+ <Markup-margin size="5"/>
111
+ <Layout nx="2" ny="4" x0="17mm" y0="5mm" dx="104.5mm" dy="72mm"/>
112
+ </Label-rectangle>
113
+ <Alias name="Avery L7664"/>
114
+ </Template>
115
+
116
+ <!-- =================================================================== -->
117
+ <!-- Avery 8414 family: Business Cards, 50.8 x 87.0 mm, 10 per sheet -->
118
+ <!-- =================================================================== -->
119
+ <Template name="Avery 8414" size="A4" _description="Business Cards">
120
+ <Label-rectangle id="0" width="246.6" height="144" round="0">
121
+ <Markup-margin size="5"/>
122
+ <Layout nx="2" ny="5" x0="42" y0="57.890" dx="264" dy="144"/>
123
+ </Label-rectangle>
124
+ <Alias name="Avery J8414"/>
125
+ </Template>
126
+
127
+ <!-- =============================================================== -->
128
+ <!-- Avery J8435: CD Inlets Booklet part -->
129
+ <!-- =============================================================== -->
130
+ <Template name="Avery 8435A" size="A4" _description="CD Booklet">
131
+ <Label-rectangle id="0" width="155mm" height="125mm" round="0">
132
+ <Markup-margin size="2mm"/>
133
+ <Markup-line x1="32mm" y1="0mm" x2="32mm" y2="125mm"/>
134
+ <Layout nx="1" ny="1" x0="27.5mm" y0="22mm" dx="155mm" dy="125mm"/>
135
+ </Label-rectangle>
136
+ <Alias name="Avery J8435A"/>
137
+ <Alias name="Avery 32250A"/>
138
+ <Alias name="Zweckform 32250A"/>
139
+ <Alias name="Zweckform J8435A"/>
140
+ </Template>
141
+
142
+ <!-- =============================================================== -->
143
+ <!-- Avery J8435: CD Inlets Inlet part -->
144
+ <!-- =============================================================== -->
145
+ <Template name="Avery 8435B" size="A4" _description="CD Inlet">
146
+ <Label-rectangle id="0" width="155mm" height="122mm" round="0">
147
+ <Markup-margin size="2mm"/>
148
+ <Markup-line x1="8.5mm" y1="0mm" x2="8.5mm" y2="122mm"/>
149
+ <Markup-line x1="146.5mm" y1="0mm" x2="146.5mm" y2="122mm"/>
150
+ <Layout nx="1" ny="1" x0="27.5mm" y0="21mm" dx="155mm" dy="122mm"/>
151
+ </Label-rectangle>
152
+ <Alias name="Avery J8435B"/>
153
+ <Alias name="Avery 32250B"/>
154
+ <Alias name="Zweckform 32250B"/>
155
+ <Alias name="Zweckform J8435B"/>
156
+ </Template>
157
+
158
+ <!-- =================================================================== -->
159
+ <!-- Avery 8651 family: Mailing labels, 38.1 x 21.2 mm, 65 per sheet -->
160
+ <!-- =================================================================== -->
161
+ <Template name="Avery 8651" size="A4" _description="Mini Address Labels">
162
+ <Label-rectangle id="0" width="108" height="60.09" round="5">
163
+ <Markup-margin size="5"/>
164
+ <Layout nx="5" ny="13" x0="13.32" y0="30.90" dx="115.09" dy="60.09"/>
165
+ </Label-rectangle>
166
+ <Alias name="Avery L8651"/>
167
+ <Alias name="Avery J8651"/>
168
+ <Alias name="Avery J8551"/>
169
+ <Alias name="Avery L7651"/>
170
+ <Alias name="Avery L7551"/>
171
+ </Template>
172
+
173
+ <!-- =================================================================== -->
174
+ <!-- Avery 8666 family: Diskette labels (face only), 70 x 52 mm, 10 per -->
175
+ <!-- =================================================================== -->
176
+ <Template name="Avery 8666" size="A4" _description="Diskette labels">
177
+ <Label-rectangle id="0" width="198.4" height="147.4" round="5">
178
+ <Markup-margin size="5"/>
179
+ <Layout nx="2" ny="5" x0="66" y0="53" dx="264" dy="147"/>
180
+ </Label-rectangle>
181
+ <Alias name="Avery J8666"/>
182
+ </Template>
183
+
184
+ <!-- =============================================================== -->
185
+ <!-- Avery J8676A: CD/DVD Labels 2 per sheet -->
186
+ <!-- =============================================================== -->
187
+ <Template name="Avery 8676" size="A4" _description="CD/DVD Labels">
188
+ <Label-cd id="0" radius="166.5" hole="17" waste="5">
189
+ <Markup-margin size="5"/>
190
+ <Layout nx="1" ny="2" x0="130" y0="59.5" dx="0" dy="388"/>
191
+ </Label-cd>
192
+ <Alias name="Avery J8676"/>
193
+ </Template>
194
+
195
+ <!-- =============================================================== -->
196
+ <!-- Avery 18036 Mailing Labels, 70mm x 32mm, 27 per sheet -->
197
+ <!-- =============================================================== -->
198
+ <Template name="Avery 18036" size="A4" _description="Mailing Labels">
199
+ <Label-rectangle id="0" width="198" height="91" round="0">
200
+ <Markup-margin size="10"/>
201
+ <Layout nx="3" ny="9" x0="0" y0="13" dx="198" dy="91"/>
202
+ </Label-rectangle>
203
+ </Template>
204
+
205
+ <!-- ============================================================ -->
206
+ <!-- Avery 32015: Business Cards -->
207
+ <!-- ============================================================ -->
208
+ <Template name="Avery 32015" size="A4" _description="Business Cards">
209
+ <Label-rectangle id="0" width="85mm" height="54mm" round="0mm">
210
+ <Markup-margin size="5mm"/>
211
+ <Layout nx="2" ny="4" x0="17mm" y0="31.5mm" dx="91mm" dy="60mm"/>
212
+ </Label-rectangle>
213
+ <Alias name="Avery C32015"/>
214
+ <Alias name="Zwekform 32015"/>
215
+ </Template>
216
+
217
+
218
+ </Glabels-templates>
219
+
220
+
221
+
222
+
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0"?>
2
+ <Glabels-templates xmlns="http://snaught.com/glabels/2.0/">
3
+
4
+
5
+ <!-- ******************************************************************** -->
6
+ <!-- Avery non-standard size products (not US-Letter/Legal or ISO) -->
7
+ <!-- ******************************************************************** -->
8
+
9
+ <!-- =================================================================== -->
10
+ <!-- Avery 06141 family: File Folder Labels, 5/8'' x 2_3/4'', 7 per sheet-->
11
+ <!-- =================================================================== -->
12
+ <Template name="Avery 06141" size="Other" width="207pt" height="351pt"
13
+ description="File Folder Labels">
14
+ <Label-rectangle id="0" width="198pt" height="45pt" round="4.5pt" waste="0pt">
15
+ <Markup-margin size="4.5pt"/>
16
+ <Layout nx="1" ny="7" x0="4.5pt" y0="4.5pt" dx="198pt" dy="49.5pt"/>
17
+ </Label-rectangle>
18
+ </Template>
19
+
20
+
21
+ </Glabels-templates>