跳到正文
Skillpedia
PDF、Word 与幻灯片25k · #10106

nocobase-app-plugin-template-print

它能做什么

这项技能指导在 NocoBase 3 应用中实现模板打印,根据模板和业务数据生成文档或 PDF。适合需要用记录数据生成可打印文档的开发者。

适用场景

  • ✓当你想打印填入了记录数据的 Word、Excel 或 PowerPoint 模板时。
  • ✓当你需要在 NocoBase 应用中根据模板生成 PDF 时。
  • ✓当文档输出需要二维码或附件时。

技能链接

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-template-print/skills/nocobase-app-plugin-template-print/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-template-print/skills/nocobase-app-plugin-template-print/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我制作一个采购订单的 Word 模板,自动填入每个订单的详细信息,并导出为 PDF。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会规划该功能,使用所选模板渲染器的公开接口,并在应用中构建路由和权限检查。然后在目标查看器中验证输出结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Goal

Implement or debug an App-owned NocoBase 3 template-printing workflow that produces an authorized document or PDF from a DOCX, XLSX, or PPTX template and business data, with the selected feature branches verified in the intended viewer and deployment.

Scope

This package provides implementation guidance only. It exports no rendering service, route, database collection, or Client/Server plugin. The App or business plugin owns the feature you implement. There is no pre-existing template-print API to call after installing this package.

Non-Goals

  • Do not implement ordinary browser page printing or silent physical-printer access.
  • Do not assume this package installs a renderer, creates a route or collection, or supplies Client/Server runtime registration.
  • Use only the installed App's v3 contracts and the selected renderer's documented public APIs.
  • Do not add an undocumented renderer adapter or claim format support that has not been verified.

Input Contract

Input Required Default Validation Clarification Question
action yes implement for a new feature; debug when a concrete failure is reported enum: implement, debug "Should I implement the workflow or diagnose an existing one?"
format yes use the supplied template extension; otherwise start with docx enum: docx, xlsx, pptx; must match the actual template "Which template format must be supported?"
output no same-format document download; add pdf only when requested enum: document, pdf, printable-pdf "Should the result be the source format, a PDF download, or a printable PDF?"
data-scope yes when business data is rendered one record for a record request; otherwise ask before selecting a broader scope enum: record, selected, current-page, all-filtered; explicit maximum "Which records may be printed?"
template-ownership no fixed App-owned asset unless managed uploads are requested enum: fixed-asset, managed-upload; separate manage/use permissions "Is the template fixed by the App or managed by users?"
locale-timezone no the App's current locale and timezone validate against the App contract before querying or formatting "Which locale and timezone should labels and dates use?"

The supplied template, App instructions, installed package versions, and existing business code are authoritative for details not listed here. If the user says "you decide", use a fixed DOCX asset, one representative record with its required child data, same-format document output, and one authorized download. Do not add XLSX, PPTX, PDF conversion, or managed template uploads in the same first slice unless requested.

Mandatory Clarification Gate

Resolve the target App, actual template format, output mode, data scope, template ownership, authorization boundary, and converter prerequisites before adding or changing an endpoint, data query, schema, dependency, or file-processing path. If a required input is missing or ambiguous, stop and ask; do not mutate code or storage before the answer. Max clarification rounds: 2. Max questions per round: 3.

Inspect the target App's instructions, installed versions, server composition, business data access, file storage, and action UI. Use its available nocobase-app-development Skill for v3 composition; use the installed auth

常见问题

这会为普通网页添加打印按钮吗?

不会。它不适用于普通的浏览器打印。

插件包含渲染器吗?

不包含。插件包只提供指导,功能由应用自行构建。

涵盖哪些格式?

按技能所述,涵盖 DOCX、XLSX 和 PPTX 模板。

详情

作者的原始描述

Use when implementing or debugging NocoBase 3 template printing with DOCX, XLSX, or PPTX templates and business data, including record/list output, attachments, QR codes, or PDF conversion; ordinary browser page printing is outside this workflow.

repo: nocobase/nocobase

热度

GitHub 星标
25k
排名
#10106
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能