
Print multiple Dymo labels from a Rails application
- or -
Post a project like this4924
$$
- Posted:
- Proposals: 1
- Remote
- #153165
- Awarded
Description
Experience Level: Intermediate
I have an application where I need to print one to many address labels on a Dymo Labelwriter 450. Labels print from a long roll of labels. I have HTML/CSS3 code that correctly prints individual labels from a MYSQL database. What is happening is that when I try to print multiple addresses, the second one partially overlays the first label, offset by about 5-6 characters. I think I need to insert a formfeed (). I tried using page-break-after:always; but it failed too. It seems to me this should be a trivial thing, but I'm fairly new rails/CSS and need some help here. I've included the code below. I know its a little rough, but it works. I have nearly the same same code to print multiple addresses on envelopes and it is working just fine using this same code structure, just different text positioning values.
Untitled Document
body {
font-family:Arial, Helvetica, sans-serif;
color:#000;
background:#fff;
}
*{
margin:0;
padding:0;
}
#layout {
height:1.1in;
width:3.5in;
-moz-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
.inner {
display:table-cell;
vertical-align:top;
height:1.1in;
width:3.5in;
}
.box {
height:1.1in;
width:3.5in;
}
.box h2{
font-size:0px;
text-align: left;
margin-left: 200px;
margin-top: 0px;
}
.box h3{
font-size:14px;
text-align:left;
margin-left: -60px;
margin-top: -15px;
}
.box h4{
font-size:14px;
text-align:left;
margin-left: 75px;
margin-top: 5px;
}
.box h5{
font-size:14px;
text-align:left;
margin-left: -60px;
margin-top: -110px;
white-space:pre;
}
.pagebreak{
page-break-after: always;
}
Same Output (in real life it is rotated 90 degrees for the label).
Ms. Diane Qwerty (3001)
99 Lake Street
Address Line 2
Santa Fe, NM
87123
Untitled Document
body {
font-family:Arial, Helvetica, sans-serif;
color:#000;
background:#fff;
}
*{
margin:0;
padding:0;
}
#layout {
height:1.1in;
width:3.5in;
-moz-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
.inner {
display:table-cell;
vertical-align:top;
height:1.1in;
width:3.5in;
}
.box {
height:1.1in;
width:3.5in;
}
.box h2{
font-size:0px;
text-align: left;
margin-left: 200px;
margin-top: 0px;
}
.box h3{
font-size:14px;
text-align:left;
margin-left: -60px;
margin-top: -15px;
}
.box h4{
font-size:14px;
text-align:left;
margin-left: 75px;
margin-top: 5px;
}
.box h5{
font-size:14px;
text-align:left;
margin-left: -60px;
margin-top: -110px;
white-space:pre;
}
.pagebreak{
page-break-after: always;
}
Same Output (in real life it is rotated 90 degrees for the label).
Ms. Diane Qwerty (3001)
99 Lake Street
Address Line 2
Santa Fe, NM
87123
Fred G.
100% (12)Projects Completed
1
Freelancers worked with
1
Projects awarded
50%
Last project
8 Dec 2014
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies