MiniMax PDF Pro

Polar Sponsor
爱发电 赞助
.NET 9.0

专业 PDF 方案:HTML+Paged.js 生成 PDF(学术论文、报告、文档),Python 处理现有 PDF(读取、提取、合并等)。

路由选择 : Route

功能概述

路由选择 : Route是一项面向实际任务的技能,主要用于Trigger.;Route File.;

核心要点

  • HTML (默认). 所有 PDF 创建请求 : Handlers/html.md.;
  • LaTeXX User 明确请求 LaTeX,.tex, 或 Teconic. handlers/latex.md.Process.。
  • 它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。

使用与执行

使用时应结合输入条件选择合适的执行方式,核对必要参数、依赖环境与输出内容,并按原始要求处理异常情况。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。

结果检查与注意事项

执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。

Route Selection

Route Trigger Route File
HTML (default) All PDF creation requests handlers/html.md
LaTeX User explicitly requests LaTeX, .tex, or Tectonic handlers/latex.md
Process Work with existing PDFs (extract, merge, fill forms, etc.) handlers/process.md

Default to HTML. Only use LaTeX route when user explicitly requests it.

MANDATORY: Use PDF Skill Scripts for Conversion

⛔ **HTML→PDF 转换必须使用本 skill 的脚本,严禁使用 convert_file 工具!**

当你写好 HTML 后,必须使用以下命令转换为 PDF:

bash .minimax/skills/minimax-pdf/scripts/pdf.sh html document.html --preserve-links

禁止行为:

  • ❌ 调用 convert_file / mcp__matrix__convert_file 工具将 HTML 转为 PDF
  • ❌ 使用任何其他方式(截图、打印等)将 HTML 转为 PDF

原因: convert_file 工具使用截图拼接方式生成 PDF,会导致:

  • 表格/内容在页面边界被粗暴切割
  • 前后页内容不连贯(对不上)
  • 文字是光栅化截图(模糊、不可选中、不可搜索)

本 skill 的 pdf.sh html 使用 Paged.js + Playwright 原生 PDF 引擎,输出矢量文本、智能分页、CSS @page 支持。

MANDATORY: Fix Errors Instead of Degrading

⛔ **Playwright/Chromium 报错时,必须修复依赖后重试,严禁降级到 convert_file!**

如果运行 pdf.sh html 或 html_to_pdf.js 时遇到以下错误:

  • Playwright module not found
  • Chromium browser not found
  • browserType.launch: Executable doesn't exist

正确做法(按顺序执行):

  1. 安装 Playwright:npm install -g playwright
  2. 安装 Chromium:npx playwright install chromium
  3. 重试原来的转换命令(pdf.sh html 或 node html_to_pdf.js)

如果 bash 在 Windows 上不可用(WSL 报错),直接用 node 调用:

node .minimax/skills/minimax-pdf/scripts/html_to_pdf.js document.html --output output.pdf --preserve-links

绝对禁止的行为:

  • ❌ 遇到 Playwright 报错后改用 convert_file / mcp__matrix__convert_file
  • ❌ 使用截图、打印、或任何其他方式替代
  • ❌ 告诉用户"Playwright 不可用,已使用备选方案"

为什么不能降级? convert_file 是截图拼接,产出的 PDF 质量极差(模糊、不可选中文字、分页错乱)。 修复依赖只需 1-2 分钟,但降级产出的 PDF 无法使用。

MANDATORY: Read Route File Before Implementation

You MUST read the corresponding route file before writing ANY code. Route files contain critical implementation details NOT duplicated here. Skipping this step leads to incorrect output (wrong scripts, missing CSS, broken layouts).

Before implementation, you MUST:

  1. Determine the route (HTML / LaTeX / Process)
  2. Read the route file (handlers/html.md, handlers/latex.md, or handlers/process.md)
  3. Only then proceed with implementation

This file (SKILL.md) contains constraints and principles. Route files contain how-to details.

Decision Rules

Route Selection

User Says Route
"Create a PDF", "Make a report", "Write a paper" HTML
"Use LaTeX", "Compile .tex", "Use Tectonic" LaTeX
"Extract text from PDF", "Merge these PDFs", "Fill this form" Process

Cover Decision (HTML Route) — 写 HTML 前必须先确认

⛔ **每次生成 PDF 前,都必须先判断是否需要封面!不要默认加封面!**

按以下流程判断:

Step 1: 用户是否提供了已有内容?(翻译、转换、邮件转 PDF、文档转 PDF 等)

  • → 是:保持原文结构,原文没封面就不加,原文有封面则还原其内容和布局。同时保留原文图片位置、图表编号等。
  • → 否:进入 Step 2

Step 2: 用户是否明确表达了封面意愿?

  • "加封面" / "做个好看的首页" → ✅ 加封面 → 选风格
  • "不要封面" / "保持原样" / "保持不变" → ❌ 不加封面
  • 没提到封面 → 进入 Step 3

Step 3: 根据内容类型推断

内容类型 封面决策
简短内容、邮件正文、备忘录 ❌ 不加
从零创作的正式报告、研究报告、论文 ✅ 推荐加
不确定 询问用户

如果决定加封面,选择风格:

Context Style
Academic paper, thesis, formal coursework Minimal
Business reports, professional documents Corporate
Technical reports, IT/tech documentation Tech
Marketing, creative, design documents Creative
⛔ **如果要加封面,必须使用 html.md 中的完整模板代码!**

禁止行为:

  • ❌ 自己设计 CSS 样式(如自创 .cover-bg, .cover-gradient, .cover-header, .cover-category 等类名)
  • ❌ 自己写 linear-gradient / radial-gradient 背景
  • ❌ 修改模板的 HTML 结构
  • ❌ 省略模板中的任何 CSS 规则

正确做法:

  1. 打开 html.md → 找到对应风格的 ⭐ TEMPLATE 部分
  2. 完整复制 HTML + CSS 代码
  3. 只替换占位文字(标题、作者、日期)
  4. 不做任何其他修改

自检: 如果你的 HTML 中有封面,class 必须是以下之一(否则你写错了):

  • cover-minimal
  • cover-corporate
  • cover-tech
  • cover-creative

如果你发现自己写的 class 不在上面的列表中(例如 .cover-header、.cover-category、.cover-meta),立即停止并使用模板重写。

Hyperlink & Image Checklist (转换已有内容时必须执行)

⛔ **转换/翻译已有内容时,必须执行以下检查!**

超链接保留:

图片数量确认(三步核对):

  1. 提取后核对:从原文(EML/DOCX 等)提取图片后,记录图片数量和文件名列表
  2. 写 HTML 后核对:确认 HTML 中的 数量与提取的图片数量一致,每张都引用到了
  3. 转换后核对:查看转换输出的 Figures/Tables: X figures 数字,确认与预期一致

如果任何一步数量不对,停下来检查,不要直接交付。

Citation Format Selection

Document Language Format
Chinese GB/T 7714 (use [J][M][D] identifiers)
English APA
Mixed Chinese refs → GB/T 7714, English refs → APA

Quick Start

Use the unified CLI for all operations (严禁使用 convert_file 工具替代):

# Check environment (JSON output, exit code 0=ok, 2=missing deps)
bash .minimax/skills/minimax-pdf/scripts/pdf.sh check

# Auto-fix missing dependencies (idempotent, safe to run multiple times)
bash .minimax/skills/minimax-pdf/scripts/pdf.sh fix

# Convert HTML to PDF (⚠️ 必须用这个命令,不要用 convert_file 工具!)
bash .minimax/skills/minimax-pdf/scripts/pdf.sh html input.html --preserve-links

# Compile LaTeX to PDF
bash .minimax/skills/minimax-pdf/scripts/pdf.sh latex input.tex

# Alternative: Direct node call for HTML conversion
node .minimax/skills/minimax-pdf/scripts/html_to_pdf.js input.html --output output.pdf --preserve-links

Note: Use bash script.sh instead of ./script.sh to avoid permission issues. ⚠️ CRITICAL: HTML→PDF conversion MUST use the commands above. Do NOT use convert_file / mcp__matrix__convert_file tool — it produces low-quality screenshot-based PDFs with broken pagination.

Exit codes:

  • 0 = success
  • 1 = usage error
  • 2 = dependency missing (run pdf.sh fix)
  • 3 = runtime error

Dependencies by route:

  • HTML route: Node.js, Playwright, Chromium
  • Process route: Python 3, pikepdf, pdfplumber
  • LaTeX route: Tectonic

Core Constraints (Must Follow)

1. Output Language

Output language must match user's query language.

  • User writes in Chinese → PDF content in Chinese
  • User writes in English → PDF content in English
  • User explicitly specifies language → Follow user's specification

2. Word Count and Page Constraints

  • Strictly follow user-specified word/page count requirements
  • Do not arbitrarily inflate content length

3. Citation and Search Standards

CRITICAL: Search Before Writing

DO NOT fabricate information. When in doubt, SEARCH.

If content involves ANY of these, you MUST search FIRST before writing:

  • Statistics, numbers, percentages, rankings
  • Policies, regulations, laws, standards
  • Academic research, theories, methodologies
  • Current events, recent developments
  • Anything you're not 100% certain about
Never proceed with writing if you need statistics, research data, or policy information without searching first. Making up facts is strictly prohibited. When uncertain, search.

When Search is Required

Scenario Search? Notes
Statistics, data Required e.g., "2024 employment rate"
Policies, regulations Required e.g., "startup subsidies"
Research, papers Required e.g., "effectiveness of method X"
Time-sensitive content Required Information after knowledge cutoff
Uncertain facts Required If unsure, always search
Common knowledge Not needed e.g., "water boils at 100°C"

Search workflow:

  1. Identify facts/data requiring verification
  2. Search for authentic sources
  3. If results insufficient, iterate search until reliable info obtained
  4. Include real sources in references
  5. If search fails repeatedly, tell the user instead of making up data

Citations Must Be Real

Fabricating references is prohibited. All citations must have:

  • Correct author/institution names
  • Accurate titles
  • Verifiable year, journal/source

Cross-references (Must Be Clickable)

As shown in Figure 1-1...
From Equation (2-1)...
See Section 3...

Note: id must be placed at container top (see CSS Counters section in html.md).

Content Quality Constraints

1. Word/Page Count Constraints

Must strictly follow user-specified word or page count requirements:

User Request Execution Standard
Specific word count (e.g., "3000 words") Within ±20%, i.e., 2400-3600 words
Specific page count (e.g., "5 pages") Exactly equal, last page may be partial
Word count range (e.g., "2000-3000 words") Must fall within range
No explicit requirement Infer reasonably by document type; prefer thorough over superficial
Minimum specified (e.g., "more than 5000 words") No more than 2x, i.e., 5000-10000 words

Prohibited behaviors:

  • Arbitrarily shortening content ("concise" is not an excuse)
  • Padding pages with excessive bullet lists (maintain high information density)
  • Exceeding twice the user's requested length

Special case - Resume/CV:

  • Resume should be 1 page unless user specifies otherwise
  • Use compact margins: margin: 1.5cm

2. Outline Adherence (Mandatory)

When user provides outline:

  • Strictly follow the user-provided outline structure
  • Section titles must match outline (minor wording adjustments OK, no level/order changes)
  • Do not add or remove sections arbitrarily
  • If outline seems problematic, ask user first before modifying

When no user outline:

  • Use standard structures based on document type:
    • Academic papers: IMRaD (Introduction-Methods-Results-Discussion) or Introduction-Literature Review-Methods-Results-Discussion-Conclusion
    • Business reports: Conclusion-first (Executive Summary → Detailed Analysis → Recommendations)
    • Technical docs: Overview → Principles → Usage → Examples → FAQ
    • Course assignments: Follow assignment structure requirements
  • Sections must have logical progression, no disconnects

Tech Stack Overview

Route Tools Purpose
HTML Playwright + Paged.js HTML → PDF conversion
HTML KaTeX, Mermaid Math formulas, diagrams
Process pikepdf Form filling, page operations, metadata
Process pdfplumber Text and table extraction
Process LibreOffice Office → PDF conversion
LaTeX Tectonic LaTeX → PDF compilation

相关专题

更多
Minimax 免费用法与平台省钱攻略
Minimax 免费用法与平台省钱攻略

针对个人用户与中小团队最关心的成本问题,全面梳理 Minimax 平台的免费使用方案与省钱技巧,涵盖海螺 AI 网页端/App 端的免费功能范围与每日使用限额、API 开放平台新用户免费额度领取与使用期限、各模型(文本/语音/视频)的 Token 计费规则与价格明细、免费版与付费会员功能权益的详细对比、通过 Prompt 优化减少 Token 消耗的实用技巧、合理选择模型版本降低调用成本的策略,帮助用户以最低成本充分利用 Minimax

2026.05.18

614

13

Minimax智能体搭建教程合集
Minimax智能体搭建教程合集

本专题整合了Minimax智能体搭建相关教程,阅读专题下面的文章了解更多详细操作步骤。

2026.05.18

178

13

Minimax AI 音乐生成与创作教程大全
Minimax AI 音乐生成与创作教程大全

讲解 Minimax 在 AI 音乐生成领域的能力与创作方法,涵盖文本描述生成音乐(Text-to-Music)的提示词编写(风格/情绪/节奏/乐器描述)、歌词创作辅助与旋律适配、音乐风格(流行/古风/电子/爵士/古典/说唱)的精准控制、AI 歌声合成与人声效果调节、生成片段的拼接编排与时长控制、AI 音乐在短视频 BGM、播客片头、游戏配乐、广告音乐等场景的商用实践,帮助音乐爱好者与内容创作者零门槛实现 AI 原创音乐。

2026.05.18

448

17

Minimax 海螺AI角色扮演与社交玩法
Minimax 海螺AI角色扮演与社交玩法

本专题围绕Minimax海螺 AI 最受用户欢迎的角色扮演功能,讲解虚拟角色的创建与人设定制(性格/背景/说话风格/记忆设定)、沉浸式多轮对话的引导技巧、角色语音绑定与实时语音对话体验、热门角色类型(AI 伴侣/历史人物/影视角色/游戏NPC/虚拟导师)的设定模板与玩法分享、社区热门角色排行与二创互动、角色对话的隐私安全与使用边界,帮助用户深度体验 AI 角色互动的乐趣并激发创意玩法灵感。

2026.05.18

319

13

Minimax API 开发与多模态集成合集
Minimax API 开发与多模态集成合集

系统讲解 Minimax 开放平台 API 的开发与集成方法,涵盖 API Key 申请与鉴权机制、Chat Completion 文本对话接口的参数配置(temperature/top_p/tokens_to_generate)与多轮对话管理、流式输出(SSE Streaming)实现、Text-to-Speech(T2A)语音合成接口与音色选择、视频生成(Video Generation)接口调用与任务状态查询、Embeddings

2026.05.13

357

18

Minimax 注册与快速入门指南
Minimax 注册与快速入门指南

面向 AI 工具新手,从 Minimax 的账号注册、海螺 AI(Hailuo AI)网页端与移动端使用讲起,介绍 Minimax 大模型家族(abab 系列语言模型、语音模型、视频模型)的能力定位与产品矩阵、智能对话的基本使用技巧、角色扮演与长文本处理功能体验、免费额度与订阅方案说明,帮助用户快速了解 Minimax 平台全貌并高效上手使用。

2026.05.13

494

13

Minimax语音克隆与AI配音实战合集
Minimax语音克隆与AI配音实战合集

聚焦 Minimax 语音技术中最受关注的声音克隆与 AI 配音应用,讲解声音克隆(Voice Clone)的录制要求与上传流程、少量样本即可定制专属音色的操作步骤、克隆音色的自然度与相似度优化技巧、中英文及多语种语音合成效果调控、情感化朗读(开心/悲伤/激昂/低沉)的参数设置,以及在短视频配音、有声读物批量制作、播客节目生成、电商产品口播、企业培训课件配音等热门场景中的实操应用。

2026.05.13

303

17

Minimax海螺AI视频生成完全攻略
Minimax海螺AI视频生成完全攻略

围绕当前最热门的 AI 视频生成需求,全面讲解 Minimax 海螺 AI 视频生成的使用方法,涵盖文本生成视频(Text-to-Video)的场景描述与镜头语言提示词编写、图片生成视频(Image-to-Video)的首帧构图与运动方向控制、视频风格(写实/动漫/电影/3D)切换技巧、生成效果的常见问题(人物变形/动作不连贯)优化策略、热门爆款视频的创作思路拆解,帮助创作者与运营人员用 AI 高效产出吸睛短视频内容。

2026.05.13

398

18

minimax大模型
minimax大模型

本专题整合了minimax大模型官网入口地址、升级内容等等内容,阅读专题下面的文章了解更多详细内容。

2026.03.31

288

24

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程