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.
36 - Cash receipt
Cash receipt (A6): payer, amount in figures/words, purpose, and stamp/signature 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: 559px;
height: 397px;
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:12px;top:12px;width:535px;height:373px;box-sizing:border-box;overflow:hidden;border:1px solid #CBD5E1;box-sizing:border-box"></div>
<div style="position:absolute;left:130px;top:26px;width:230px;height:38px;box-sizing:border-box;overflow:hidden;font-size:24px;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:412px;top:31px;width:122px;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">SJ20261027001</div>
<div style="position:absolute;left:372px;top:32px;width:40px;height:14px;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:412px;top:49px;width:122px;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">2026-10-27</div>
<div style="position:absolute;left:372px;top:50px;width:40px;height:14px;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:32px;top:80px;width:495px;height:2px;box-sizing:border-box;overflow:hidden;background:#334155"></div>
<div style="position:absolute;left:124px;top:94px;width:380px;height:24px;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">杭州示例商贸有限公司</div>
<div style="position:absolute;left:40px;top:96px;width:80px;height:22px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">今收到</div>
<div style="position:absolute;left:124px;top:122px;width:380px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:124px;top:134px;width:380px;height:24px;box-sizing:border-box;overflow:hidden;font-size:11px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">2026 年 9 月画册印刷款</div>
<div style="position:absolute;left:40px;top:136px;width:80px;height:22px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">交 来</div>
<div style="position:absolute;left:124px;top:162px;width:380px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:152px;top:179px;width:300px;height:24px;box-sizing:border-box;overflow:hidden;font-size:12px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">壹万贰仟捌佰陆拾元整</div>
<div style="position:absolute;left:40px;top:182px;width:110px;height:20px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">人民币(大写)</div>
<div style="position:absolute;left:62px;top:210px;width:180px;height:32px;box-sizing:border-box;overflow:hidden;font-size:18px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">12,860.00</div>
<div style="position:absolute;left:40px;top:216px;width:20px;height:26px;box-sizing:border-box;overflow:hidden;font-size:12px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">¥</div>
<div style="position:absolute;left:314px;top:216px;width:190px;height:26px;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:270px;top:218px;width:40px;height:20px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">备注</div>
<div style="position:absolute;left:32px;top:258px;width:495px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:372px;top:268px;width:140px;height:44px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#94A3B8;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">(财务盖章)</div>
<div style="position:absolute;left:132px;top:270px;width:200px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">杭州云印科技有限公司</div>
<div style="position:absolute;left:40px;top:272px;width:90px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">收款单位</div>
<div style="position:absolute;left:40px;top:318px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">经手人</div>
<div style="position:absolute;left:290px;top:318px;width:40px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">日期</div>
<div style="position:absolute;left:102p
// …
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.