如何解决如何使用DYMO打印机在HTML页面下方打印?
如何使用DYMO打印机打印以下HTML文件。以下是示例HTML文件。但是实际上,我将为ID分配值,然后单击按钮,我将从DYMO打印机打印标签或贴纸。我将使用JS函数处理此问题。
下面,我分享了我的HTML和样式表。
HTML页面
<html>
<head>
<title>Print Sticker</title>
<link href="stylesheet/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
.margincss {
margin-top: 5%;
margin-left: auto;
margin-right: auto;
}
.padTB {
padding-top: 2%;
padding-bottom: 2%;
}
.hr-text {
line-height: 1em;
position: relative;
outline: 0;
border: 0;
color: black;
text-align: left;
height: 1.5em;
/*opacity: .5;*/
}
.hr-text:before {
content: '';
background: linear-gradient(to right,black,black);
position: absolute;
left: 15%;
top: 75%;
width: 100%;
height: 1px;
}
.hr-text:after {
content: attr(data-content);
position: relative;
display: inline-block;
color: black;
padding: 0 .5em;
line-height: 1.5em;
color: black;
background-color: none;
}
@page {
size: A4;
margin-top: 0.45in;
width: 100%;
height: 100%;
zoom: 1;
}
@media print {
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}
</style>
</head>
<body>
<div id="pnl1">
<div class="row padTB">
<div class="col-md-12">
<div style="width:35%;" class="col-md-6 col-sm-6 col-xs-6">
<b>Ship to NY </b><br />
Supplier Name : <span id="NYClientname">Clay CORPORATION PVT LTD</span><br />
Invoice Number : <span id="NYInvoiceNo">CON-10-21</span><br />
No. Of packs : <span id="NYNoOfstones">0</span><br />
Date : <span id="NYMemoDate"> 09-09-2020</span>
</div>
</div>
</div>
<div class="row padTB">
<div class="col-md-12">
<div style="width:35%;" class="col-md-6 col-sm-6 col-xs-6">
<b>Ship to Akron </b><br />
Supplier Name : <span id="AkronClientname">Clay CORPORATION PVT LTD</span><br />
Invoice Number : <span id="AkronInvoiceNo">CON-10-21</span><br />
No. Of packs : <span id="AkronNoOfstones">1</span><br />
Date : <span id="AkronMemoDate">09-09-2020</span>
</div>
</div>
</div>
</div>
</body>
</html>
任何帮助将不胜感激。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。