Live demos
Browse the sample list on the left and preview layouts plus sample code on the right. Run a demo to print silently or preview PDF via web-print-pdf and the local client. Install and launch the client first.
Client
If results look wrong, install the latest Web Print Expert client from our site first (older builds may cause layout drift).
Layout
Preview and print follow standard HTML/CSS only—no hidden tricks. What you style is what you get.
55 - Asset tag
Asset tag (60×40mm): asset name, ID, and barcode.
Layout preview
Sample code
const html = `<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>资产标签</title>
<style>
html, body { margin: 0; padding: 0; }
.biz-sheet {
position: relative;
width: 227px;
height: 151px;
box-sizing: border-box;
background: #fff;
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
color: #0F172A;
overflow: hidden;
}
</style>
</head>
<body>
<div class="biz-sheet">
<div style="position:absolute;left:3px;top:3px;width:221px;height:145px;box-sizing:border-box;overflow:hidden;border:1px solid #1D4ED8;box-sizing:border-box"></div>
<div style="position:absolute;left:8px;top:8px;width:211px;height:18px;box-sizing:border-box;overflow:hidden;font-size:12px;font-weight:700;color:#0F172A;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">固定资产标签</div>
<div style="position:absolute;left:3px;top:30px;width:221px;height:1px;box-sizing:border-box;overflow:hidden;background:#1D4ED8"></div>
<div style="position:absolute;left:52px;top:33px;width:111px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">ThinkPad X1</div>
<div style="position:absolute;left:8px;top:34px;width:42px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">名称</div>
<div style="position:absolute;left:52px;top:55px;width:111px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">陈思远</div>
<div style="position:absolute;left:8px;top:56px;width:42px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">使用人</div>
<div style="position:absolute;left:52px;top:77px;width:111px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">3F 设计部 A-12</div>
<div style="position:absolute;left:8px;top:78px;width:42px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">位置</div>
<div style="position:absolute;left:8px;top:107px;width:211px;height:34px;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center"><svg width="211" height="24" viewBox="0 0 211 24" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><rect x="0" y="0" width="1" height="24" fill="#111"/><rect x="3" y="0" width="3" height="24" fill="#111"/><rect x="7" y="0" width="3" height="24" fill="#111"/><rect x="11" y="0" width="1" height="24" fill="#111"/><rect x="13" y="0" width="1" height="24" fill="#111"/><rect x="16" y="0" width="3" height="24" fill="#111"/><rect x="20" y="0" width="1" height="24" fill="#111"/><rect x="23" y="0" width="3" height="24" fill="#111"/><rect x="27" y="0" width="3" height="24" fill="#111"/><rect x="31" y="0" width="1" height="24" fill="#111"/><rect x="33" y="0" width="1" height="24" fill="#111"/><rect x="36" y="0" width="3" height="24" fill="#111"/><rect x="40" y="0" width="1" height="24" fill="#111"/><rect x="43" y="0" width="3" height="24" fill="#111"/><rect x="47" y="0" width="3" height="24" fill="#111"/><rect x="51" y="0" width="1" height="24" fill="#111"/><rect x="53" y="0" width="1" height="24" fill="#111"/><rect x="56" y="0" width="3" height="24" fill="#111"/><rect x="60" y="0" width="1" height="24" fill="#111"/><rect x="63" y="0" width="3" height="24" fill="#111"/><rect x="67" y="0" width="3" height="24" fill="#111"/><rect x="71" y="0" width="1" height="24" fill="#111"/><rect x="73" y="0" width="1" height="24" fill="#111"/><rect x="76" y="0" width="3" height="24" fill="#111"/><rect x="80" y="0" width="1" height="24" fill="#111"/><rect x="83" y="0" width="3" height="24" fill="#111"/><rect x="87" y="0" width="3" height="24" fill="#111"/><rect x="91" y="0" width="1" height="24" fill="#111"/><rect x="93" y="0" width="1" height="24" fill="#111"/><rect x="96" y="0" width="3" height="24" fill="#111"/><rect x="100" y="0" width="1" height="24" fill="#111"/><rect x="103" y="0" width="3" height="24" fill="#111"/><rect x="107" y="0" width="3" height="24" fill="#111"/><rect x="111" y="0" width="1" height="24" fill="#111"/><rect x="113" y="0" width="1" height="24" fill="#111"/><rect x="116" y="0" width="3" height="24" fill="#111"/><rect x="120" y="0" width="1" height="24" fill="#111"/><rect x="123" y="0" width="3" height="24" fill="#111"/><rect x="127" y="0" width="3" height="24" fill="#111"/><rect x="131" y="0" width="1" height="24" fill="#111"/><rect x="133" y="0" width="1" height="24" fill="#111"/><rect x="136" y="0" width="3" height="24" fill="#111"/><rect x="140" y="0" width="1" height="24" fill="#111"/><rect x="143" y="0" width="3" height="24" fill="#111"/><rect x="147" y="0" width="3" height="24" fill="#111"/><rect x="151" y="0" width="1" height="24" fill="#111"/><rect x="153" y="0" width="1" height="24" fill="#111"/><rect x="156" y="0" width="3" height="24" fill="#111"/><rect x="160" y="0" width="1" height="24" fill="#111"/><rect x="163" y="0" width="3" height="24" fill="#111"/><rect x="167" y="0" width="3" height="24" fill="#111"/><rect x="171" y="0" width="1" height="24" fill="#111"/><rect x="173" y="0" width="1" height="24" fill="#111"/><rect x="176" y="0" width="3" height="24" fill="#111"/><rect x="180" y="0" width="1" height="24" fill="#111"/><rect x="183" y="0" width="3" height="24" fill="#111"/><rect x="187" y="0" width="3" height="24" fill="#111"/><rect x="191" y="0" width="1" height="24" fill="#111"/><rect x="193" y="0" width="1" height="24" fill="#111"/><rect x="196" y="0" width="3" height="24" fill="#111"/><rect x="200" y="0
// …
Result
- If printing fails or the client cannot connect, see Local print works—production does not? (common on HTTP deployments).
- The client’s built-in Run examples page has more editable demos; this page complements it.
- Utility demos (connection, printer list) return JSON only—no print job.