在线样例

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

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

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

客户端

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

版式说明

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

84 - 培训需求调研问卷

培训需求调研问卷打印样例。

示例代码

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:0px;top:0px;width:794px;height:120px;box-sizing:border-box;overflow:hidden;background:#4C1D95"></div>
<div style="position:absolute;left:586px;top:30px;width:160px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">吴迪</div>
<div style="position:absolute;left:500px;top:32px;width:70px;height:20px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#C4B5FD;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">姓 名</div>
<div style="position:absolute;left:48px;top:38px;width:400px;height:34px;box-sizing:border-box;overflow:hidden;font-size:23px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">培训需求调研问卷</div>
<div style="position:absolute;left:586px;top:58px;width:160px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">市场部</div>
<div style="position:absolute;left:500px;top:60px;width:70px;height:20px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#C4B5FD;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">部 门</div>
<div style="position:absolute;left:48px;top:78px;width:400px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#C4B5FD;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">TRAINING NEEDS ASSESSMENT</div>
<div style="position:absolute;left:586px;top:86px;width:160px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">市场专员</div>
<div style="position:absolute;left:500px;top:88px;width:70px;height:20px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#C4B5FD;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">岗 位</div>
<div style="position:absolute;left:48px;top:150px;width:24px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#7C3AED;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">01</div>
<div style="position:absolute;left:76px;top:150px;width:620px;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:76px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;background:#FAF5FF;border:1px solid #DDD6FE;box-sizing:border-box"></div>
<div style="position:absolute;left:76px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#5B21B6;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">专业技能</div>
<div style="position:absolute;left:236px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;background:#FAF5FF;border:1px solid #DDD6FE;box-sizing:border-box"></div>
<div style="position:absolute;left:236px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#5B21B6;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">沟通协作</div>
<div style="position:absolute;left:396px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;background:#FAF5FF;border:1px solid #DDD6FE;box-sizing:border-box"></div>
<div style="position:absolute;left:396px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#5B21B6;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">管理能力</div>
<div style="position:absolute;left:556px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;background:#FAF5FF;border:1px solid #DDD6FE;box-sizing:border-box"></div>
<div style="position:absolute;left:556px;top:178px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#5B21B6;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">工具应用</div>
<div style="position:absolute;left:48px;top:238px;width:698px;height:1px;box-sizing:border-box;overflow:hidden;background:#EDE9FE"></div>
<div style="position:absolute;left:48px;top:260px;width:24px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;font-weight:700;color:#7C3AED;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">02</div>
<div style="position:absolute;left:76px;top:260px;width:620px;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:76px;top:288px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;background:#FAF5FF;border:1px solid #DDD6FE;box-sizing:border-box"></div>
<div style="position:absolute;left:76px;top:288px;width:148px;height:34px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#5B21B6;text-align:center;display:flex;align-items:center;justify-content:center;white-space:pre-wrap">线下授课</div>
<div style="position:absolute;left:236px;top:288px;width:148px;height:34px;box-sizing:border-box
// …

运行结果

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