在线样例
左侧浏览样例目录,右侧查看版式预览与示例代码;点击运行即可通过 web-print-pdf 驱动本地客户端完成静默打印或 PDF 预览。使用前请先 安装并启动客户端。
客户端
若打印或预览效果与预期不符,请务必先从官网下载并安装最新版 Web打印专家客户端后再试(旧版本可能导致版式偏差)。
版式说明
版式预览与打印输出完全遵循 HTML/CSS 标准样式,没有隐藏的渲染技巧:样式写成什么样,页面就长成什么样。
74 - 课程反馈表
课程反馈表打印样例。
版式预览
示例代码
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:92px;width:698px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#94A3B8;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">COURSE FEEDBACK FORM</div>
<div style="position:absolute;left:48px;top:116px;width:698px;height:3px;box-sizing:border-box;overflow:hidden;background:#0EA5E9"></div>
<div style="position:absolute;left:48px;top:140px;width:222px;height:58px;box-sizing:border-box;overflow:hidden;background:#F0F9FF"></div>
<div style="position:absolute;left:286px;top:140px;width:222px;height:58px;box-sizing:border-box;overflow:hidden;background:#F0F9FF"></div>
<div style="position:absolute;left:524px;top:140px;width:222px;height:58px;box-sizing:border-box;overflow:hidden;background:#F0F9FF"></div>
<div style="position:absolute;left:60px;top:148px;width:198px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">课程名称</div>
<div style="position:absolute;left:298px;top:148px;width:198px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">授课教师</div>
<div style="position:absolute;left:536px;top:148px;width:198px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">班级</div>
<div style="position:absolute;left:60px;top:166px;width:198px;height:22px;box-sizing:border-box;overflow:hidden;font-size:10px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">高中物理 · 电磁感应</div>
<div style="position:absolute;left:298px;top:166px;width:198px;height:22px;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:536px;top:166px;width:198px;height:22px;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:48px;top:210px;width:340px;height:58px;box-sizing:border-box;overflow:hidden;background:#F0F9FF"></div>
<div style="position:absolute;left:406px;top:210px;width:340px;height:58px;box-sizing:border-box;overflow:hidden;background:#F0F9FF"></div>
<div style="position:absolute;left:60px;top:218px;width:316px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">填表日期</div>
<div style="position:absolute;left:418px;top:218px;width:316px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">学生姓名</div>
<div style="position:absolute;left:60px;top:236px;width:316px;height:22px;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:418px;top:236px;width:316px;height:22px;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:48px;top:292px;width:698px;height:72px;box-sizing:border-box;overflow:hidden;background:#FFFFFF;border:1px solid #E2E8F0;box-sizing:border-box"></div>
<div style="position:absolute;left:100px;top:310px;width:626px;height:20px;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:64px;top:317px;width:22px;height:22px;box-sizing:border-box;overflow:hidden;background:#0EA5E9"></div>
<div style="position:absolute;left:64px;top:317px;width:22px;height:22px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#FFFFFF;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">1</div>
<div style="position:absolute;left:100px;top:336px;width:626px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#475569;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">□ 完全听懂 □ 大部分听懂 □ 一般 □ 有些吃力 □ 完全听不懂</div>
<div style="position:absolute;left:48px;top:380px;width:698px;height:72px;box-sizing:border-box;overflow:hidden;background:#FFFFFF;border:1px solid #E2E8F0;box-sizing:border-box"></div>
<div style="position:absolute;left:100px;top:398px;width:626px;height:20px;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:64px;top:405px;width:22px;height:22px;box-sizing:border-box;overflow:hidden;background:#0EA5E9"></div>
<div style="position:absolute;left:64px;top:405px;width:22px;height:22px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#FFFFFF;text-align:center;display:fl
// …
运行结果
- 若无法打印或连接客户端失败,请参阅 本地Print succeeded,上线后无法打印?(HTTP 业务系统上线后常见)。
- 客户端内置「运行示例」页(
vueApp/.../examples/index.vue)提供更多可编辑 demo,与本页样例互补。 - 工具类样例(连接检测、打印机列表等)仅返回 JSON,不触发打印。