pdf-labels 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.
Files changed (142) hide show
  1. data/History.txt +8 -0
  2. data/LICENCE +38 -0
  3. data/Manifest.txt +141 -0
  4. data/README.txt +72 -0
  5. data/Rakefile +30 -0
  6. data/lib/alias.rb +8 -0
  7. data/lib/glabel_template.rb +36 -0
  8. data/lib/label.rb +52 -0
  9. data/lib/layout.rb +13 -0
  10. data/lib/length_node.rb +47 -0
  11. data/lib/markup.rb +25 -0
  12. data/lib/pdf_label_page.rb +171 -0
  13. data/lib/pdf_labels.rb +6 -0
  14. data/lib/template.rb +37 -0
  15. data/templates/avery-iso-templates.xml +222 -0
  16. data/templates/avery-other-templates.xml +21 -0
  17. data/templates/avery-us-templates.xml +599 -0
  18. data/templates/glabels-2.0.dtd +329 -0
  19. data/templates/misc-iso-templates.xml +434 -0
  20. data/templates/misc-other-templates.xml +21 -0
  21. data/templates/misc-us-templates.xml +183 -0
  22. data/templates/paper-sizes.xml +37 -0
  23. data/templates/zweckform-iso-templates.xml +197 -0
  24. data/test/test_pdf_label_page.rb +91 -0
  25. data/vendor/color.rb +87 -0
  26. data/vendor/color/cmyk.rb +182 -0
  27. data/vendor/color/css.rb +27 -0
  28. data/vendor/color/grayscale.rb +135 -0
  29. data/vendor/color/hsl.rb +130 -0
  30. data/vendor/color/palette.rb +15 -0
  31. data/vendor/color/palette/gimp.rb +107 -0
  32. data/vendor/color/palette/monocontrast.rb +180 -0
  33. data/vendor/color/rgb-colors.rb +189 -0
  34. data/vendor/color/rgb.rb +311 -0
  35. data/vendor/color/rgb/metallic.rb +28 -0
  36. data/vendor/color/yiq.rb +78 -0
  37. data/vendor/pdf/charts.rb +13 -0
  38. data/vendor/pdf/charts/stddev.rb +433 -0
  39. data/vendor/pdf/grid.rb +135 -0
  40. data/vendor/pdf/math.rb +108 -0
  41. data/vendor/pdf/pagenumbers.rb +288 -0
  42. data/vendor/pdf/quickref.rb +331 -0
  43. data/vendor/pdf/simpletable.rb +947 -0
  44. data/vendor/pdf/techbook.rb +901 -0
  45. data/vendor/pdf/writer.rb +2801 -0
  46. data/vendor/pdf/writer/arc4.rb +63 -0
  47. data/vendor/pdf/writer/fontmetrics.rb +202 -0
  48. data/vendor/pdf/writer/fonts/Courier-Bold.afm +342 -0
  49. data/vendor/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
  50. data/vendor/pdf/writer/fonts/Courier-Oblique.afm +342 -0
  51. data/vendor/pdf/writer/fonts/Courier.afm +342 -0
  52. data/vendor/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
  53. data/vendor/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
  54. data/vendor/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
  55. data/vendor/pdf/writer/fonts/Helvetica.afm +3051 -0
  56. data/vendor/pdf/writer/fonts/Symbol.afm +213 -0
  57. data/vendor/pdf/writer/fonts/Times-Bold.afm +2588 -0
  58. data/vendor/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
  59. data/vendor/pdf/writer/fonts/Times-Italic.afm +2667 -0
  60. data/vendor/pdf/writer/fonts/Times-Roman.afm +2419 -0
  61. data/vendor/pdf/writer/fonts/ZapfDingbats.afm +225 -0
  62. data/vendor/pdf/writer/graphics.rb +813 -0
  63. data/vendor/pdf/writer/graphics/imageinfo.rb +365 -0
  64. data/vendor/pdf/writer/lang.rb +44 -0
  65. data/vendor/pdf/writer/lang/en.rb +104 -0
  66. data/vendor/pdf/writer/object.rb +23 -0
  67. data/vendor/pdf/writer/object/action.rb +40 -0
  68. data/vendor/pdf/writer/object/annotation.rb +42 -0
  69. data/vendor/pdf/writer/object/catalog.rb +39 -0
  70. data/vendor/pdf/writer/object/contents.rb +69 -0
  71. data/vendor/pdf/writer/object/destination.rb +40 -0
  72. data/vendor/pdf/writer/object/encryption.rb +53 -0
  73. data/vendor/pdf/writer/object/font.rb +68 -0
  74. data/vendor/pdf/writer/object/fontdescriptor.rb +34 -0
  75. data/vendor/pdf/writer/object/fontencoding.rb +40 -0
  76. data/vendor/pdf/writer/object/image.rb +308 -0
  77. data/vendor/pdf/writer/object/info.rb +79 -0
  78. data/vendor/pdf/writer/object/outline.rb +30 -0
  79. data/vendor/pdf/writer/object/outlines.rb +30 -0
  80. data/vendor/pdf/writer/object/page.rb +195 -0
  81. data/vendor/pdf/writer/object/pages.rb +115 -0
  82. data/vendor/pdf/writer/object/procset.rb +46 -0
  83. data/vendor/pdf/writer/object/viewerpreferences.rb +74 -0
  84. data/vendor/pdf/writer/ohash.rb +58 -0
  85. data/vendor/pdf/writer/oreader.rb +25 -0
  86. data/vendor/pdf/writer/state.rb +48 -0
  87. data/vendor/pdf/writer/strokestyle.rb +140 -0
  88. data/vendor/transaction/simple.rb +693 -0
  89. data/vendor/transaction/simple/group.rb +133 -0
  90. data/vendor/transaction/simple/threadsafe.rb +52 -0
  91. data/vendor/transaction/simple/threadsafe/group.rb +23 -0
  92. data/vendor/xml-mapping/ChangeLog +128 -0
  93. data/vendor/xml-mapping/LICENSE +56 -0
  94. data/vendor/xml-mapping/README +386 -0
  95. data/vendor/xml-mapping/README_XPATH +175 -0
  96. data/vendor/xml-mapping/Rakefile +214 -0
  97. data/vendor/xml-mapping/TODO.txt +32 -0
  98. data/vendor/xml-mapping/doc/xpath_impl_notes.txt +119 -0
  99. data/vendor/xml-mapping/examples/company.rb +34 -0
  100. data/vendor/xml-mapping/examples/company.xml +26 -0
  101. data/vendor/xml-mapping/examples/company_usage.intin.rb +19 -0
  102. data/vendor/xml-mapping/examples/company_usage.intout +39 -0
  103. data/vendor/xml-mapping/examples/order.rb +61 -0
  104. data/vendor/xml-mapping/examples/order.xml +54 -0
  105. data/vendor/xml-mapping/examples/order_signature_enhanced.rb +7 -0
  106. data/vendor/xml-mapping/examples/order_signature_enhanced.xml +9 -0
  107. data/vendor/xml-mapping/examples/order_signature_enhanced_usage.intin.rb +12 -0
  108. data/vendor/xml-mapping/examples/order_signature_enhanced_usage.intout +16 -0
  109. data/vendor/xml-mapping/examples/order_usage.intin.rb +73 -0
  110. data/vendor/xml-mapping/examples/order_usage.intout +147 -0
  111. data/vendor/xml-mapping/examples/time_augm.intin.rb +19 -0
  112. data/vendor/xml-mapping/examples/time_augm.intout +23 -0
  113. data/vendor/xml-mapping/examples/time_node.rb +27 -0
  114. data/vendor/xml-mapping/examples/xpath_create_new.intin.rb +85 -0
  115. data/vendor/xml-mapping/examples/xpath_create_new.intout +181 -0
  116. data/vendor/xml-mapping/examples/xpath_docvsroot.intin.rb +30 -0
  117. data/vendor/xml-mapping/examples/xpath_docvsroot.intout +34 -0
  118. data/vendor/xml-mapping/examples/xpath_ensure_created.intin.rb +62 -0
  119. data/vendor/xml-mapping/examples/xpath_ensure_created.intout +114 -0
  120. data/vendor/xml-mapping/examples/xpath_pathological.intin.rb +42 -0
  121. data/vendor/xml-mapping/examples/xpath_pathological.intout +56 -0
  122. data/vendor/xml-mapping/examples/xpath_usage.intin.rb +51 -0
  123. data/vendor/xml-mapping/examples/xpath_usage.intout +57 -0
  124. data/vendor/xml-mapping/install.rb +40 -0
  125. data/vendor/xml-mapping/lib/xml/mapping.rb +14 -0
  126. data/vendor/xml-mapping/lib/xml/mapping/base.rb +571 -0
  127. data/vendor/xml-mapping/lib/xml/mapping/standard_nodes.rb +343 -0
  128. data/vendor/xml-mapping/lib/xml/mapping/version.rb +8 -0
  129. data/vendor/xml-mapping/lib/xml/xxpath.rb +354 -0
  130. data/vendor/xml-mapping/test/all_tests.rb +6 -0
  131. data/vendor/xml-mapping/test/company.rb +56 -0
  132. data/vendor/xml-mapping/test/documents_folders.rb +33 -0
  133. data/vendor/xml-mapping/test/fixtures/bookmarks1.xml +24 -0
  134. data/vendor/xml-mapping/test/fixtures/company1.xml +85 -0
  135. data/vendor/xml-mapping/test/fixtures/documents_folders.xml +71 -0
  136. data/vendor/xml-mapping/test/fixtures/documents_folders2.xml +30 -0
  137. data/vendor/xml-mapping/test/multiple_mappings.rb +80 -0
  138. data/vendor/xml-mapping/test/tests_init.rb +2 -0
  139. data/vendor/xml-mapping/test/xml_mapping_adv_test.rb +84 -0
  140. data/vendor/xml-mapping/test/xml_mapping_test.rb +201 -0
  141. data/vendor/xml-mapping/test/xpath_test.rb +273 -0
  142. metadata +191 -0
@@ -0,0 +1,25 @@
1
+ require 'length_node'
2
+
3
+
4
+ class MarkupMargin
5
+ include XML::Mapping
6
+ length_node :size, "@size"
7
+
8
+ end
9
+
10
+ class MarkupLine
11
+ include XML::Mapping
12
+ length_node :x1, "@x1"
13
+ length_node :y1, "@y1"
14
+ length_node :x2, "@x2"
15
+ length_node :y2, "@y2"
16
+ end
17
+
18
+ class MarkupCircle
19
+ include XML::Mapping
20
+ length_node :x0, "@x0"
21
+ length_node :y0, "@y0"
22
+ length_node :radius, "@radius"
23
+ end
24
+
25
+
@@ -0,0 +1,171 @@
1
+ $: << File.expand_path(File.dirname(__FILE__) + "/../vendor")
2
+ require 'xml/mapping'
3
+ require 'glabel_template'
4
+ require 'pdf/writer'
5
+ #--- require 'breakpoint'
6
+
7
+ class PDFLabelPage
8
+ attr_accessor :gt, :template, :label, :pdf
9
+ @@gt = nil
10
+ def initialize(template_name, pdf_opts = {})
11
+ @@gt || PDFLabelPage.load_template_set
12
+ unless @template = @@gt.find_template(template_name)
13
+ raise "Template not found!"
14
+ end
15
+ #if the template specifies the paper type, and the user didn't use it.
16
+ if @template.size && !pdf_opts.has_key?(:paper)
17
+ pdf_opts[:paper] = @template.size.gsub(/^.*-/,'')
18
+ end
19
+ #TODO figure out how to cope with multiple label types on a page
20
+ @label = @template.labels["0"]
21
+ #TODO figure out how to handle multiple layouts
22
+ @layout = @label.layouts[0]
23
+ @pdf = PDF::Writer.new(pdf_opts)
24
+ @pdf.margins_pt(0, 0, 0, 0)
25
+ end
26
+
27
+ def PDFLabelPage.load_template_set(template_set_file=nil)
28
+ template_set_file ||= File.expand_path(File.dirname(__FILE__) + "/../templates/avery-us-templates.xml")
29
+ @@gt = GlabelsTemplate.load_from_file(template_set_file)
30
+ end
31
+
32
+ def PDFLabelPage.all_template_names
33
+ @@gt || PDFLabelPage.load_template_set
34
+ @@gt.find_all_templates
35
+ end
36
+
37
+ =begin rdoc
38
+ add_label takes an argument hash.
39
+ [:position] Which label slot to print. Positions are top to bottom, left to right so position 1 is the label in the top lefthand corner. Defaults to 0
40
+ [:x & :y] The (x,y) coordinates on the page to print the text. Ignored if position is specified.
41
+ [:text] What you want to print in the label. Defaults to the (x,y) of the top left corner of the label.
42
+ [:use_margin] If the label has a markupMargin, setting this argument to true will respect that margin when writing text. Defaults to true.
43
+ [:justification] Values can be :left, :right, :center, :full. Defaults to :left
44
+ [:offset_x, offset_y] If your printer doesn't want to print with out margins you can define these values to fine tune printout.
45
+ =end
46
+ def add_label(options = {})
47
+ if position = options[:position]
48
+ label_x, label_y = position_to_x_y(position)
49
+ elsif((label_x = options[:x]) && (label_y = options[:y]))
50
+ else
51
+ label_x, label_y = position_to_x_y(0)
52
+ end
53
+ #line wrap margin
54
+ label_width = label_x + @label.width.as_pts
55
+
56
+ if (use_margin = options[:use_margin]).nil?
57
+ use_margin = true
58
+ end
59
+ if use_margin
60
+ @label.markupMargins.each {|margin|
61
+ label_x = label_x + margin.size.as_pts
62
+ label_y = label_y - margin.size.as_pts
63
+ label_width = label_width - margin.size.as_pts
64
+ }
65
+ end
66
+
67
+ if offset = options[:offset_x]
68
+ label_x = label_x + offset
69
+ label_width = label_width + offset
70
+ end
71
+ if offset = options[:offset_y]
72
+ label_y = label_y + offset
73
+ end
74
+ text = options[:text] || "[#{label_x / 72}, #{label_y / 72}]"
75
+ arg_hash = {:justification => (options[:justification] || :left),
76
+ :font_size => (options[:font_size] || 12)}
77
+
78
+ arg_hash = arg_hash.merge :absolute_left => label_x,
79
+ :absolute_right => label_width
80
+ @pdf.y = label_y
81
+ @pdf.text(text,arg_hash)
82
+ end
83
+ =begin rdoc
84
+ You can add the same text to many labels this way, takes all the arguments of add_label, but must have position instead of x,y. Requires count.
85
+ [:count] - Number of labels to print
86
+ =end
87
+ def add_many_labels(options = {})
88
+ if (options[:x] || options[:y]) && !options[:position]
89
+ raise "Can't use X,Y with add_many_labels, you must use position"
90
+ end
91
+ if !options[:position]
92
+ options[:position] = 0
93
+ end
94
+ raise "Count required" unless options[:count]
95
+ count = options[:count]
96
+ count.times do
97
+ add_label(options)
98
+ options[:position] = options[:position] + 1
99
+ end
100
+ end
101
+ =begin rdoc
102
+ To facilitate aligning a printer we give a method that prints the outlines of the labels
103
+ =end
104
+ def draw_boxes(write_coord = true, draw_markups = true)
105
+ @layout.nx.times do |x|
106
+ @layout.ny.times do |y|
107
+ box_x, box_y = get_x_y(x, y)
108
+ @pdf.rounded_rectangle(box_x,
109
+ box_y,
110
+ @label.width.as_pts,
111
+ @label.height.as_pts,
112
+ @label.round.as_pts).stroke
113
+ if write_coord
114
+ text = "#{box_x / 72}, #{box_y / 72}, #{@label.width.number}, #{label.height.number}"
115
+ add_label(:x => box_x, :y => box_y, :text => text)
116
+ end
117
+
118
+ if draw_markups
119
+ @label.markupMargins.each {|margin|
120
+ size = margin.size.as_pts
121
+ @pdf.rounded_rectangle(box_x + size,
122
+ box_y - margin.size.as_pts,
123
+ @label.width.as_pts - 2*size,
124
+ @label.height.as_pts - 2*size,
125
+ @label.round.as_pts).stroke
126
+ }
127
+ @label.markupLines.each {|line|
128
+ @pdf.line(box_x + line.x1.as_pts,
129
+ box_y + line.y1.as_pts,
130
+ box_x + line.x2.as_pts,
131
+ box_y + line.y2.as_pts).stroke
132
+ }
133
+ =begin TODO Draw cirles
134
+ @label.markupCircles.each {|cicle|
135
+ @pdf.
136
+ =end
137
+ end
138
+
139
+ end
140
+ end
141
+ end
142
+
143
+ def save_as(file_name)
144
+ @pdf.save_as(file_name)
145
+ end
146
+
147
+ protected
148
+
149
+ =begin rdoc
150
+ Position is top to bottom, left to right, starting at 1 and ending at the end of the page
151
+ =end
152
+ def position_to_x_y(position)
153
+ x = (position * 1.0 / @layout.ny).floor
154
+ y = position % @layout.ny
155
+ return get_x_y(x, y)
156
+ end
157
+
158
+ def get_x_y(x, y)
159
+ label_y = @pdf.absolute_top_margin
160
+ label_y = label_y + @pdf.top_margin
161
+ label_y = label_y - @layout.y0.as_pts
162
+ label_y = label_y - y * @layout.dy.as_pts
163
+
164
+ label_x = @pdf.absolute_left_margin
165
+ label_x = label_x - @pdf.left_margin
166
+ label_x = label_x + @layout.x0.as_pts
167
+ label_x = label_x + x * @layout.dx.as_pts
168
+
169
+ return label_x, label_y
170
+ end
171
+ end
@@ -0,0 +1,6 @@
1
+ #This file just adds the lib directory below it into the load path and
2
+ #loads up all the classes in lib via require
3
+
4
+ class Pdflabels
5
+ VERSION = '1.0.0'
6
+ end
@@ -0,0 +1,37 @@
1
+ require 'alias'
2
+ require 'label'
3
+ require 'markup'
4
+
5
+ class Template
6
+ include XML::Mapping
7
+ attr_accessor :labels
8
+
9
+ text_node :name, "@name"
10
+ text_node :size, "@size"
11
+ text_node :description, "@description", :default_value => ""
12
+ text_node :_description, "@_description", :default_value => ""
13
+ length_node :width, "@width", :default_value => nil
14
+ length_node :height, "@height", :default_value => nil
15
+
16
+ #TODO this could be cleaner, but I'm not sure how yet
17
+ hash_node :labelRectangles, "Label-rectangle", "@id", :class => LabelRectangle, :default_value => nil
18
+ hash_node :labelRounds, "Label-round", "@id", :class => LabelRound, :default_value => nil
19
+ hash_node :labelCDs, "Label-cd", "@id", :class => LabelCD, :default_value => nil
20
+
21
+ hash_node :alias, "Alias", "@name", :class => Alias, :default_value => Hash.new
22
+
23
+ def initialize
24
+
25
+ end
26
+
27
+ def labels
28
+ @labels = Hash.new
29
+ @labels = @labels.merge @labelRectangles
30
+ @labels = @labels.merge @labelRounds
31
+ @labels = @labels.merge @labelCDs
32
+ @labels
33
+ end
34
+
35
+ end
36
+
37
+
@@ -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
+