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.

33 - VAT ordinary invoice

VAT ordinary invoice print sample from the template market.

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: 529px;
      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:16px;top:16px;width:762px;height:500px;box-sizing:border-box;overflow:hidden;background:#FFFFFF;border:1px solid #8B4A3B;box-sizing:border-box"></div>
<div style="position:absolute;left:247px;top:26px;width:300px;height:34px;box-sizing:border-box;overflow:hidden;font-size:22px;font-weight:700;color:#8B4A3B;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">增值税普通发票</div>
<div style="position:absolute;left:596px;top:28px;width:60px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">发票代码</div>
<div style="position:absolute;left:656px;top:28px;width:108px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">033002100311</div>
<div style="position:absolute;left:32px;top:32px;width:140px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">第二联:发票联</div>
<div style="position:absolute;left:596px;top:46px;width:60px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">发票号码</div>
<div style="position:absolute;left:656px;top:46px;width:108px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">18863026</div>
<div style="position:absolute;left:32px;top:50px;width:190px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">机器编号:661234567890</div>
<div style="position:absolute;left:596px;top:64px;width:60px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">开票日期</div>
<div style="position:absolute;left:656px;top:64px;width:108px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">2026-10-27</div>
<div style="position:absolute;left:30px;top:100px;width:18px;height:92px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#8B4A3B;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">购
买
方</div>
<div style="position:absolute;left:52px;top:104px;width:44px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">名称</div>
<div style="position:absolute;left:100px;top:104px;width:424px;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:52px;top:126px;width:74px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">纳税人识别号</div>
<div style="position:absolute;left:130px;top:126px;width:394px;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">91330100MA2K8X8X0A</div>
<div style="position:absolute;left:52px;top:148px;width:74px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">地址、电话</div>
<div style="position:absolute;left:130px;top:148px;width:394px;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">杭州市余杭区文一西路 969 号 0571-88886666</div>
<div style="position:absolute;left:52px;top:170px;width:74px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#8B4A3B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">开户行及账号</div>
<div style="position:absolute;left:130px;top:170px;width:394px;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">招商银行杭州分行 5719 0288 6611 001</div>
<div style="position:absolute;left:32px;top:204px;width:730px;height:190px;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:6.0274%;box-sizing:border-box;border:1px solid #8B4A3B;padding:0 6px;height:28px;background:#F8F2EF;color:#8B4A3B;font-size:9px;font-weight:600;text-align:center">序号</th><th style="width:34.2466%;box-sizing:border-box;border:1px solid #8B4A3B;padding:0 6px;height:28px;background:#F8F2EF;color:#8B4A3B;font-size:9px;font-weight:600;text-align:left">货物或应税劳务名称</th><th style="width:12.3288%;box-sizing:border-box;border:1px solid #8B4A3B;padding:0 6px;height:28px;background:#F8F2EF;color:#8B4A3B;font-size:9px;font-weight:600;text-align:left">规格型号</th><th style="width:6.3014%;box-sizing:border-box;border:1px solid #8B4A3B;padding:0 6px;height:28px;background:#F8F2EF;color:#8B4A3B;font-size:9px;font-weight:600;text-align:center">单位</th><th style="width:8.
// …

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