Live demos

Enable JavaScript to use the live demos.

Your browser is too old for this page. Please use the latest Chrome, Edge, Firefox, or Safari.

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.

40 - Travel expense

A4 travel expense form: trip info, itinerary costs, advances, and reimbursement total.

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:48px;top:56px;width:698px;height:32px;box-sizing:border-box;overflow:hidden;font-size:22px;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:48px;top:94px;width:698px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#94A3B8;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">TRAVEL EXPENSE REIMBURSEMENT</div>
<div style="position:absolute;left:48px;top:122px;width:698px;height:2px;box-sizing:border-box;overflow:hidden;background:#334155"></div>
<div style="position:absolute;left:48px;top:136px;width:698px;height:104px;box-sizing:border-box;overflow:hidden;border:1px solid #E2E8F0;box-sizing:border-box"></div>
<div style="position:absolute;left:128px;top:145px;width:256px;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:468px;top:145px;width:256px;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:60px;top:146px;width:64px;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:400px;top:146px;width:64px;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:128px;top:173px;width:256px;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:468px;top:173px;width:256px;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">10-20 至 10-24</div>
<div style="position:absolute;left:60px;top:174px;width:64px;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:400px;top:174px;width:64px;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:128px;top:201px;width:256px;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">12 张</div>
<div style="position:absolute;left:468px;top:201px;width:256px;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">2026-10-27</div>
<div style="position:absolute;left:60px;top:202px;width:64px;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:400px;top:202px;width:64px;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:48px;top:260px;width:698px;height:546px;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:15.7593%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:left">日期</th><th style="width:26.9341%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:left">事项</th><th style="width:14.3266%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">交通费</th><th style="width:15.7593%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">住宿费</th><th style="width:14.3266%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">补贴</th><th style="width:12.8940%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:36px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">小计</th></tr></thead><tbody><tr><td style="box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:30px;font-size:10px;color:#0F172A;text-align:left;vertical-align:middle">10-20</td><td style="box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:30px;font-size:10px;color:#0F172A;text-align:left;vertical-align:middle">杭州 → 南京 高铁</td><td style="box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:30px;font-size:10px;color:#0F172A;text-align:right;vertical-align:middle">428.
// …

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.
Download client free View npm package