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.
14 - JD Logistics waybill
JD Logistics waybill (100×150mm): brand bar, tracking barcode, addresses, item table, and delivery 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:44px;box-sizing:border-box;overflow:hidden;background:#111827"></div>
<div style="position:absolute;left:12px;top:9px;width:200px;height:26px;box-sizing:border-box;overflow:hidden;font-size:13px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">京东物流 JD LOGISTICS</div>
<div style="position:absolute;left:250px;top:13px;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">950616</div>
<div style="position:absolute;left:52px;top:50px;width:200px;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">JDVA12345678901</div>
<div style="position:absolute;left:12px;top:52px;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:12px;top:76px;width:354px;height:56px;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center"><svg width="354" height="46" viewBox="0 0 354 46" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><rect x="0" y="0" width="3" height="46" fill="#111"/><rect x="6" y="0" width="3" height="46" fill="#111"/><rect x="12" y="0" width="2" height="46" fill="#111"/><rect x="17" y="0" width="1" height="46" fill="#111"/><rect x="20" y="0" width="3" height="46" fill="#111"/><rect x="24" y="0" width="2" height="46" fill="#111"/><rect x="29" y="0" width="1" height="46" fill="#111"/><rect x="31" y="0" width="2" height="46" fill="#111"/><rect x="36" y="0" width="3" height="46" fill="#111"/><rect x="42" y="0" width="3" height="46" fill="#111"/><rect x="47" y="0" width="3" height="46" fill="#111"/><rect x="51" y="0" width="2" height="46" fill="#111"/><rect x="56" y="0" width="1" height="46" fill="#111"/><rect x="59" y="0" width="3" height="46" fill="#111"/><rect x="63" y="0" width="1" height="46" fill="#111"/><rect x="66" y="0" width="3" height="46" fill="#111"/><rect x="72" y="0" width="3" height="46" fill="#111"/><rect x="78" y="0" width="2" height="46" fill="#111"/><rect x="83" y="0" width="1" height="46" fill="#111"/><rect x="86" y="0" width="3" height="46" fill="#111"/><rect x="90" y="0" width="2" height="46" fill="#111"/><rect x="95" y="0" width="1" height="46" fill="#111"/><rect x="97" y="0" width="2" height="46" fill="#111"/><rect x="102" y="0" width="3" height="46" fill="#111"/><rect x="108" y="0" width="3" height="46" fill="#111"/><rect x="113" y="0" width="3" height="46" fill="#111"/><rect x="117" y="0" width="2" height="46" fill="#111"/><rect x="122" y="0" width="1" height="46" fill="#111"/><rect x="125" y="0" width="3" height="46" fill="#111"/><rect x="129" y="0" width="1" height="46" fill="#111"/><rect x="132" y="0" width="3" height="46" fill="#111"/><rect x="138" y="0" width="3" height="46" fill="#111"/><rect x="144" y="0" width="2" height="46" fill="#111"/><rect x="149" y="0" width="1" height="46" fill="#111"/><rect x="152" y="0" width="3" height="46" fill="#111"/><rect x="156" y="0" width="2" height="46" fill="#111"/><rect x="161" y="0" width="1" height="46" fill="#111"/><rect x="163" y="0" width="2" height="46" fill="#111"/><rect x="168" y="0" width="3" height="46" fill="#111"/><rect x="174" y="0" width="3" height="46" fill="#111"/><rect x="179" y="0" width="3" height="46" fill="#111"/><rect x="183" y="0" width="2" height="46" fill="#111"/><rect x="188" y="0" width="1" height="46" fill="#111"/><rect x="191" y="0" width="3" height="46" fill="#111"/><rect x="195" y="0" width="1" height="46" fill="#111"/><rect x="198" y="0" width="3" height="46" fill="#111"/><rect x="204" y="0" width="3" height="46" fill="#111"/><rect x="210" y="0" width="2" height="46" fill="#111"/><rect x="215" y="0" width="1" height="46" fill="#111"/><rect x="218" y="0" width="3" height="46" fill="#111"/><rect x="222" y="0" width="2" height="46" fill="#111"/><rect x="227" y="0" width="1" height="46" fill="#111"/><rect x="229" y="0" width="2" height="46" fill="#111"/><rect x="234" y="0" width="3" height="46" fill="#111"/><rect x="240" y="0" width="3" height="46" fill="#111"/><rect x="245" y="0" width="3" height="46" fill="#111"/><rect x="249" y="0" width="2" height="46" fill="#111"/><rect x="254" y="0" width="1" height="46" fill="#111"/><rect x="257" y="0" width="3" height="46" fill="#111"/><rect x="261" y="0" width="1" height="46" fill="#111"/><rect x="264" y="0" width="3" height="46" fill="#111"/><rect x="270" y="0" width="3" height="46" fill="#111"/><rect x="276" y="0" width="2" height="46" fill="#111"/><rect x="281" y="0" width="1" height="46" fill="#111"/><rect x="284" y="0" width="3" height="46" fill="#111"/><rect x="288" y="0" width="2" height="46" fill="#111"/><rect x="293" y="0" width="1" height="46" fill="#111"/><rect x="295" y="0" width="2" height="46" fill="#111"/><rect x="300" y="0" width="3" height="46" fill="#111"/><rect x="306" y="0" width="3" height="46" fill="#111"/><rect x="311" y="0" width="3" height="46" fill="#111"/><rect x="315" y="0" width="2" height="46" fill="#111"/><rect x="320" y="0" width="1" height="46" fill="#111"/><rect x="323" y="0" width="3" height="46" fill="#111"/><rect x="327" y="0" width="1" height="4
// …
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.