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.

65 - Student transcript

A4 student transcript: courses, credits, grades, and school stamp.

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:50px;width:400px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#1E40AF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">市第二中学 · 教务处</div>
<div style="position:absolute;left:546px;top:52px;width:200px;height:64px;box-sizing:border-box;overflow:hidden;background:#EFF6FF;border:1px solid #BFDBFE;box-sizing:border-box"></div>
<div style="position:absolute;left:620px;top:60px;width:112px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#0F172A;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">2026 学年第一学期</div>
<div style="position:absolute;left:560px;top:62px;width:60px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#1E40AF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">学期</div>
<div style="position:absolute;left:48px;top:70px;width:400px;height:36px;box-sizing:border-box;overflow:hidden;font-size:24px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">学生成绩单</div>
<div style="position:absolute;left:620px;top:88px;width:112px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#0F172A;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">2026-10-27</div>
<div style="position:absolute;left:560px;top:90px;width:60px;height:14px;box-sizing:border-box;overflow:hidden;font-size:7.5px;color:#1E40AF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">打印日期</div>
<div style="position:absolute;left:48px;top:110px;width:400px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#94A3B8;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">ACADEMIC TRANSCRIPT</div>
<div style="position:absolute;left:48px;top:140px;width:698px;height:2px;box-sizing:border-box;overflow:hidden;background:#1E40AF"></div>
<div style="position:absolute;left:48px;top:154px;width:698px;height:44px;box-sizing:border-box;overflow:hidden;background:#F8FAFC"></div>
<div style="position:absolute;left:104px;top:166px;width:130px;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:334px;top:166px;width:100px;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">20240317</div>
<div style="position:absolute;left:504px;top:166px;width:140px;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">高二(3)班</div>
<div style="position:absolute;left:62px;top:168px;width:40px;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:292px;top:168px;width:40px;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:462px;top:168px;width:40px;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:214px;width:698px;height:420px;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:40.1146%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#EFF6FF;color:#1E40AF;font-size:9.5px;font-weight:600;text-align:left">科目</th><th style="width:17.1920%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#EFF6FF;color:#1E40AF;font-size:9.5px;font-weight:600;text-align:right">学分</th><th style="width:18.6246%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#EFF6FF;color:#1E40AF;font-size:9.5px;font-weight:600;text-align:right">成绩</th><th style="width:24.0688%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#EFF6FF;color:#1E40AF;font-size:9.5px;font-weight:600;text-align:right">绩点</th></tr></thead><tbody><tr><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48px;font-size:10px;color:#0F172A;text-align:left;vertical-align:middle">语文</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48px;font-size:10px;color:#0F172A;text-align:right;vertical-align:middle">5</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48px;font-size:10px;color:#0F172A;text-align:right;vertical-align:middle">92</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48px;font-size:10px;color:#0F172A;text-align:right;vertical-align:middle">4.2</td></tr><tr><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48px;font-size:10px;color:#0F172A;text-align:left;vertical-align:middle">数学</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:48p
// …

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