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.
63 - Vaccination record
A4 vaccination record: vaccine, dose, date, and batch/lot.
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: 794px;
height: 1123px;
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:794px;height:96px;box-sizing:border-box;overflow:hidden;background:#0E7490"></div>
<div style="position:absolute;left:48px;top:20px;width:400px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#A5F3FC;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">城东社区卫生服务中心</div>
<div style="position:absolute;left:540px;top:26px;width:206px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#A5F3FC;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">接种证号</div>
<div style="position:absolute;left:48px;top:42px;width:400px;height:34px;box-sizing:border-box;overflow:hidden;font-size:23px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">预防接种记录</div>
<div style="position:absolute;left:540px;top:44px;width:206px;height:20px;box-sizing:border-box;overflow:hidden;font-size:11px;font-weight:700;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">YF-2021-0316</div>
<div style="position:absolute;left:48px;top:78px;width:400px;height:12px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#67E8F9;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">VACCINATION RECORD</div>
<div style="position:absolute;left:48px;top:112px;width:698px;height:76px;box-sizing:border-box;overflow:hidden;background:#ECFEFF"></div>
<div style="position:absolute;left:114px;top:122px;width:160px;height:18px;box-sizing:border-box;overflow:hidden;font-size:10px;font-weight:600;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">林一诺</div>
<div style="position:absolute;left:394px;top:122px;width:120px;height:18px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">2021-03-16</div>
<div style="position:absolute;left:614px;top:122px;width:110px;height:18px;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:62px;top:124px;width:48px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">受种者</div>
<div style="position:absolute;left:330px;top:124px;width:60px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">出生日期</div>
<div style="position:absolute;left:560px;top:124px;width:50px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">监护人</div>
<div style="position:absolute;left:126px;top:150px;width:180px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9.5px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">137 0000 8899</div>
<div style="position:absolute;left:414px;top:150px;width:100px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">5 岁 7 个月</div>
<div style="position:absolute;left:614px;top:150px;width:110px;height:18px;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:62px;top:152px;width:60px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">联系电话</div>
<div style="position:absolute;left:350px;top:152px;width:60px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">当前年龄</div>
<div style="position:absolute;left:560px;top:152px;width:50px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">建档点</div>
<div style="position:absolute;left:48px;top:204px;width:698px;height:40px;box-sizing:border-box;overflow:hidden;background:#F0FDFA"></div>
<div style="position:absolute;left:64px;top:204px;width:666px;height:40px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#0E7490;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">免疫规划疫苗由政府免费提供,非免疫规划疫苗知情自愿自费接种</div>
<div style="position:absolute;left:48px;top:262px;width:698px;height:436px;box-sizing:border-box;overflow:hidden;overflow:hidden"><table style="width:100%;max-width:100%;border-collapse:collapse;table-layout:fixed;box-sizing:border-box"><thead><tr><th style="width:25.7880%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#ECFEFF;color:#0E7490;font-size:9px;font-weight:600;text-align:left">疫苗名称</th><th style="width:10.0287%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#ECFEFF;color:#0E7490;font-size:9px;font-weight:600;text-align:center">剂次</th><th style="width:18.6246%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#ECFEFF;color:#0E7490;font-size:9px;font-w
// …
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.