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.
70 - Exam admission
Exam admission card (54×86mm): candidate, exam, seat, and photo area.
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: 204px;
height: 325px;
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:204px;height:68px;box-sizing:border-box;overflow:hidden;background:#1D4ED8"></div>
<div style="position:absolute;left:12px;top:10px;width:180px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#BFDBFE;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">全国统一考试</div>
<div style="position:absolute;left:12px;top:24px;width:180px;height:26px;box-sizing:border-box;overflow:hidden;font-size:16px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">准 考 证</div>
<div style="position:absolute;left:12px;top:52px;width:180px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#DBEAFE;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">ZK202600138</div>
<div style="position:absolute;left:56px;top:79px;width:136px;height:14px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">赵子萱</div>
<div style="position:absolute;left:12px;top:80px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">姓名</div>
<div style="position:absolute;left:56px;top:103px;width:136px;height:14px;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:12px;top:104px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">考点</div>
<div style="position:absolute;left:56px;top:127px;width:136px;height:14px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">第 12 考场</div>
<div style="position:absolute;left:12px;top:128px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">考场</div>
<div style="position:absolute;left:56px;top:151px;width:136px;height:14px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#1D4ED8;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">08</div>
<div style="position:absolute;left:12px;top:152px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">座位</div>
<div style="position:absolute;left:56px;top:175px;width:136px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">10-27 09:00-11:00</div>
<div style="position:absolute;left:12px;top:176px;width:40px;height:12px;box-sizing:border-box;overflow:hidden;font-size:6.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">时间</div>
<div style="position:absolute;left:70px;top:198px;width:64px;height:64px;box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center"><svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><rect x="0.00" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="5.82" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="11.64" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="17.45" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="29.09" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="46.55" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="52.36" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="58.18" y="0.00" width="5.82" height="5.82" fill="#111"/><rect x="0.00" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="5.82" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="11.64" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="23.27" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="34.91" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="46.55" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="52.36" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="58.18" y="5.82" width="5.82" height="5.82" fill="#111"/><rect x="0.00" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="5.82" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="11.64" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="29.09" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="40.73" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="46.55" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="52.36" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="58.18" y="11.64" width="5.82" height="5.82" fill="#111"/><rect x="5.82" y="17.45" width="5.82" height="5.82" fill="#111"/><rect x="17.45" y="17.45" width="5.82" height="5.82" fill="#111"/><rect x="34.91" y="17.45" width="5.82" height="5.82" fill="#111"/><rect x="46.55" y="17.45" width="5.82" height="5.82" fill="#111"/><rect x="11.64" y="23.27" width="5.82" height="5.82" fill="#111"/><rect x="23.27" y="23.27" width="5.82" height="5.82" fill="#111"/><rect x="40.73" y="23.27" width="5.82" height="5.82" fill="#111"/><rect x="52.36" y="23.27" wid
// …
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.