在线样例

请启用 JavaScript 后使用在线样例。

您的浏览器版本过旧,请升级至 Chrome、Edge、Firefox 或 Safari 最新版后再访问在线样例。

左侧浏览样例目录,右侧查看版式预览与示例代码;点击运行即可通过 web-print-pdf 驱动本地客户端完成静默打印或 PDF 预览。使用前请先 安装并启动客户端。

客户端

若打印或预览效果与预期不符,请务必先从官网下载并安装最新版 Web打印专家客户端后再试(旧版本可能导致版式偏差)。

版式说明

版式预览与打印输出完全遵循 HTML/CSS 标准样式,没有隐藏的渲染技巧:样式写成什么样,页面就长成什么样。

68 - 听课记录

听课记录打印样例。

示例代码

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:300px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;font-weight:700;color:#7C3AED;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">TEACHING &amp; RESEARCH</div>
<div style="position:absolute;left:618px;top:62px;width:128px;height:30px;box-sizing:border-box;overflow:hidden;background:#F5F3FF"></div>
<div style="position:absolute;left:618px;top:62px;width:128px;height:30px;box-sizing:border-box;overflow:hidden;font-size:8.5px;font-weight:700;color:#6D28D9;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">教研活动记录</div>
<div style="position:absolute;left:48px;top:68px;width:400px;height:36px;box-sizing:border-box;overflow:hidden;font-size:23px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">听课记录</div>
<div style="position:absolute;left:48px;top:108px;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">LESSON OBSERVATION RECORD</div>
<div style="position:absolute;left:48px;top:136px;width:698px;height:76px;box-sizing:border-box;overflow:hidden;background:#F8FAFC"></div>
<div style="position:absolute;left:124px;top:144px;width:158px;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:144px;width:158px;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:564px;top:144px;width:166px;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:146px;width:56px;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:146px;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:522px;top:146px;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:104px;top:174px;width:178px;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">《赤壁赋》第二课时</div>
<div style="position:absolute;left:354px;top:174px;width:138px;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">2026-10-27 第 2 节</div>
<div style="position:absolute;left:564px;top:174px;width:166px;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">教学楼 A-302</div>
<div style="position:absolute;left:62px;top:176px;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:176px;width:56px;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:522px;top:176px;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:232px;width:698px;height:312px;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:20.0573%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#F5F3FF;color:#6D28D9;font-size:9.5px;font-weight:600;text-align:left">教学环节</th><th style="width:54.4413%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#F5F3FF;color:#6D28D9;font-size:9.5px;font-weight:600;text-align:left">教学过程记录</th><th style="width:25.5014%;box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:36px;background:#F5F3FF;color:#6D28D9;font-size:9.5px;font-weight:600;text-align:left">评价</th></tr></thead><tbody><tr><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:46px;font-size:9.5px;color:#0F172A;text-align:left;vertical-align:middle">导入</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:46px;font-size:9.5px;color:#0F172A;text-align:left;vertical-align:middle">以赤壁实景视频导入,提问引出作者心境</td><td style="box-sizing:border-box;border:1px solid #E2E8F0;padding:0 6px;height:46px;font-size:9.5px;color:#0F172A;text-align:left;vertical-align:middle">情境创设自然</td></tr><tr><td style="box-sizing:border-box;borde
// …

运行结果

  • 若无法打印或连接客户端失败,请参阅 本地Print succeeded,上线后无法打印?(HTTP 业务系统上线后常见)。
  • 客户端内置「运行示例」页(vueApp/.../examples/index.vue)提供更多可编辑 demo,与本页样例互补。
  • 工具类样例(连接检测、打印机列表等)仅返回 JSON,不触发打印。
免费下载客户端 查看 npm 包