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.
12 - ZTO waybill
ZTO waybill layout (100×150mm): brand bar, tracking barcode, destination, addresses, weight/COD, and receipt stub.
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: 378px;
height: 567px;
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:0px;top:0px;width:378px;height:46px;box-sizing:border-box;overflow:hidden;background:#1B5FAA"></div>
<div style="position:absolute;left:12px;top:10px;width:180px;height:26px;box-sizing:border-box;overflow:hidden;font-size:15px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">中通快递 ZTO</div>
<div style="position:absolute;left:250px;top:14px;width:116px;height:18px;box-sizing:border-box;overflow:hidden;font-size:12px;font-weight:700;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">95311</div>
<div style="position:absolute;left:52px;top:52px;width:180px;height:18px;box-sizing:border-box;overflow:hidden;font-size:13px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">ZT781234567890</div>
<div style="position:absolute;left:286px;top:52px;width:80px;height:18px;box-sizing:border-box;overflow:hidden;font-size:13px;font-weight:700;color:#0F172A;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">021</div>
<div style="position:absolute;left:12px;top:54px;width:36px;height:12px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">运单号</div>
<div style="position:absolute;left:240px;top:54px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">目的地</div>
<div style="position:absolute;left:12px;top:78px;width:354px;height:54px;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center"><svg width="354" height="44" viewBox="0 0 354 44" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><rect x="0" y="0" width="1" height="44" fill="#111"/><rect x="2" y="0" width="2" height="44" fill="#111"/><rect x="7" y="0" width="2" height="44" fill="#111"/><rect x="12" y="0" width="1" height="44" fill="#111"/><rect x="15" y="0" width="3" height="44" fill="#111"/><rect x="19" y="0" width="2" height="44" fill="#111"/><rect x="24" y="0" width="1" height="44" fill="#111"/><rect x="26" y="0" width="1" height="44" fill="#111"/><rect x="28" y="0" width="2" height="44" fill="#111"/><rect x="33" y="0" width="2" height="44" fill="#111"/><rect x="38" y="0" width="1" height="44" fill="#111"/><rect x="41" y="0" width="3" height="44" fill="#111"/><rect x="45" y="0" width="2" height="44" fill="#111"/><rect x="50" y="0" width="1" height="44" fill="#111"/><rect x="52" y="0" width="1" height="44" fill="#111"/><rect x="54" y="0" width="2" height="44" fill="#111"/><rect x="59" y="0" width="2" height="44" fill="#111"/><rect x="64" y="0" width="1" height="44" fill="#111"/><rect x="67" y="0" width="3" height="44" fill="#111"/><rect x="71" y="0" width="2" height="44" fill="#111"/><rect x="76" y="0" width="1" height="44" fill="#111"/><rect x="78" y="0" width="1" height="44" fill="#111"/><rect x="80" y="0" width="2" height="44" fill="#111"/><rect x="85" y="0" width="2" height="44" fill="#111"/><rect x="90" y="0" width="1" height="44" fill="#111"/><rect x="93" y="0" width="3" height="44" fill="#111"/><rect x="97" y="0" width="2" height="44" fill="#111"/><rect x="102" y="0" width="1" height="44" fill="#111"/><rect x="104" y="0" width="1" height="44" fill="#111"/><rect x="106" y="0" width="2" height="44" fill="#111"/><rect x="111" y="0" width="2" height="44" fill="#111"/><rect x="116" y="0" width="1" height="44" fill="#111"/><rect x="119" y="0" width="3" height="44" fill="#111"/><rect x="123" y="0" width="2" height="44" fill="#111"/><rect x="128" y="0" width="1" height="44" fill="#111"/><rect x="130" y="0" width="1" height="44" fill="#111"/><rect x="132" y="0" width="2" height="44" fill="#111"/><rect x="137" y="0" width="2" height="44" fill="#111"/><rect x="142" y="0" width="1" height="44" fill="#111"/><rect x="145" y="0" width="3" height="44" fill="#111"/><rect x="149" y="0" width="2" height="44" fill="#111"/><rect x="154" y="0" width="1" height="44" fill="#111"/><rect x="156" y="0" width="1" height="44" fill="#111"/><rect x="158" y="0" width="2" height="44" fill="#111"/><rect x="163" y="0" width="2" height="44" fill="#111"/><rect x="168" y="0" width="1" height="44" fill="#111"/><rect x="171" y="0" width="3" height="44" fill="#111"/><rect x="175" y="0" width="2" height="44" fill="#111"/><rect x="180" y="0" width="1" height="44" fill="#111"/><rect x="182" y="0" width="1" height="44" fill="#111"/><rect x="184" y="0" width="2" height="44" fill="#111"/><rect x="189" y="0" width="2" height="44" fill="#111"/><rect x="194" y="0" width="1" height="44" fill="#111"/><rect x="197" y="0" width="3" height="44" fill="#111"/><rect x="201" y="0" width="2" height="44" fill="#111"/><rect x="206" y="0" width="1" height="44" fill="#111"/><rect x="208" y="0" width="1" height="44" fill="#111"/><rect x="210" y="0" width="2" height="44" fill="#111"/><rect x="215" y="0" width="2" height="44" fill="#111"/><rect x="220" y="0" width="1" height="44" fill="#111"/><rect x="223" y="0" width="3" height="44" fill="#111"/><rect x="227" y="0" width="2" height="44" fill="#111"/><rect x="232" y="0" width="1" height="44" fill="#111"/><rect x="234" y="0" width="1" height="44" fill="#111"/><rect x="236" y="0" width="2" height="44" fill="#111"/><rect x="241" y="0" width="2" height="44"
// …
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.