This report makes it easier to create custom label sizes. Plug in the measurements of your labels at the top, and format the contents. Make sure to include units in the measurements, with no space after the number. (You can use millimeters for metric sizes.)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!-- Page Size (US-Letter, A4, etc) -->
{% capture pageSize %}
US-Letter
{% endcapture %}
<!-- Page Margin (Top Right Bottom Left) -->
{% capture pageMargins %}
0.5in 0.1875in 0.5in 0.1875in
{% endcapture %}
<!-- Label Height -->
{% capture labelHeight %}
1in
{% endcapture %}
<!-- Label Width -->
{% capture labelWidth %}
2.625in
{% endcapture %}
<!-- Labels Per Page -->
{% capture labelCount %}
30
{% endcapture %}
<!-- Space between columns -->
{% capture columnSpacing %}
0.125in
{% endcapture %}
<!-- Space between rows -->
{% capture rowSpacing %}
0in
{% endcapture %}
{% assign pageSize = pageSize | strip_newlines %}
{% assign pageMargins = pageMargins | strip_newlines %}
{% assign labelHeight = labelHeight | strip_newlines %}
{% assign labelWidth = labelWidth | strip_newlines %}
{% assign labelCount = labelCount | strip_newlines %}
{% assign columnSpacing = columnSpacing | strip_newlines %}
{% assign rowSpacing = rowSpacing | strip_newlines %}
{{ helpers.bootstrap_3 }}
<html>
<head>
<title>Avery Labels</title>
<style>
@media print {
body { margin: 0; padding: 0; }
}
@media screen {
body { margin:{{pageMargins}}; margin-right: 0 !important; margin-bottom: 0 !important; }
}
@page { margin:{{pageMargins}}; margin-right: 0 !important; margin-bottom: 0 !important; size: {{pageSize}}; }
ul { margin: 0; padding: 0; }
ul.labels li {
margin: 0 {{ columnSpacing }} {{ rowSpacing }} 0;
padding: 0;
float: left;
width: {{ labelWidth }};
height: {{ labelHeight }} !important;
display: block;
}
ul.labels li:nth-of-type({{- labelCount | plus: 1 -}}n+{{- labelCount | plus: 1 -}}) { page-break-inside: avoid;}
/* FORMAT LABEL CONTENTS */
div.labelcontents {
margin: 0;
padding: 0.1in 0.1in 0 0.1in;
width: 100%;
font-size: 11pt;
}
</style>
</head>
<body>
<ul class="labels">
{% for person in people %}
<li>
<div class="labelcontents">
{{ person.name }}<br>
{{ person.primary_address.street }}<br>
{{ person.primary_address.city }} {{ person.primary_address.state }} {{ person.primary_address.zip }}
</div>
</li>
{% endfor %}
</ul>
</body>
</html>