pdf-trad-to-simp-preserve-layout
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "pdf-trad-to-simp-preserve-layout":https://skillpi.com/zh/skills/deepskill-6dab2861a30569886fdb1df9647fe8eda425557a747cda7b6761df6c15572460。安装前核对上游来源和版本:https://github.com/superpilot69/pdf-trad-to-simp-preserve-layout-kit。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
将繁体中文 PDF 转换为简体中文,同时尽可能保留页面尺寸、图像、可选文本与整体布局。适用于需要在不重建书籍或不改动图片与原始结构的情况下替换或转换文本层的场景,例如替换仅含图像的封面或在替换文本层后调整正文字体。
介绍来源: third_party · superpilot69 · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- Convert traditional Chinese PDFs to simplified Chinese while preserving page size, images, selectable text, and overall layout as much as possible. Use when Codex is asked to directly convert a source PDF from 繁体 to 简体 without rebuilding the book, to keep the original PDF structure and pictures, to replace an image-only cover after conversion, or to make the body font lighter after text-layer replacement.
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: pdf-trad-to-simp-preserve-layout
description: Convert traditional Chinese PDFs to simplified Chinese while preserving page size, images, selectable text, and overall layout as much as possible. Use when Codex is asked to directly convert a source PDF from 繁体 to 简体 without rebuilding the book, to keep the original PDF structure and pictures, to replace an image-only cover after conversion, or to make the body font lighter after text-layer replacement.PDF Trad To Simp Preserve Layout
Overview
Use this skill when layout fidelity matters more than reflowed typography. The bundled scripts keep the original PDF page geometry and images, replace only the text layer on text-based pages, and handle image-only cover pages as a separate replacement step.
Follow This Workflow
- Inspect whether the PDF already has a usable text layer.
- Run
pdftotext -f 5 -l 5 input.pdf - | sed -n '1,20p'. - If you get readable text, use
scripts/convert_pdf_t2s_preserve_layout.py. - If the whole file is scan-only, stop and use OCR first. This skill is not an OCR workflow.
- Choose a full Chinese font before writing simplified text back into the PDF.
- Do not reuse the source PDF's embedded subset font. Many book PDFs embed only the traditional glyph subset, so simplified text will render incorrectly or disappear.
- Prefer a lighter Songti-style font for book body text.
- On macOS, extract a face from
Songti.ttcwithscripts/extract_ttc_font.py, or let the converter auto-detect it.
- Install the bundled dependencies once.
SKILL_DIR="${CODEX_HOME:-$HOME/.codex}/skills/pdf-trad-to-simp-preserve-layout"
"$SKILL_DIR/scripts/install_deps.sh"
source "$SKILL_DIR/.venv/bin/activate"
- Convert the text layer without rebuilding the book.
python "$SKILL_DIR/scripts/convert_pdf_t2s_preserve_layout.py" \
input.pdf output.pdf \
--font-style light
- Pass
--font-path /path/to/font.ttfif you already have a suitable full font. - Pass
--font-ttc /path/to/Songti.ttc --font-style regularto override automatic font discovery. - Use
--font-size-scaleor--baseline-y-shiftonly for small visual tuning passes.
- Replace image-only cover pages separately when needed.
python "$SKILL_DIR/scripts/replace_pdf_cover.py" \
output.pdf final.pdf cover.png
- Use this when the cover is a full-page image and therefore cannot be fixed by text-layer replacement.
- The replacement preserves page count and the rest of the document.
- Verify the result before declaring success.
- Run
pdfinfo final.pdf. - Run
pdftotext -f 9 -l 9 final.pdf - | sed -n '1,20p'. - Render a few pages and compare cover, body text weight, and image pages.
- Read references/workflow.md for troubleshooting and a more detailed checklist.
Use These Bundled Tools
scripts/install_deps.sh: Create a skill-local virtual environment and install the required Python packages.scripts/extract_ttc_font.py: List or extract faces from a.ttccollection.scripts/convert_pdf_t2s_preserve_layout.py: Convert text-layer pages from traditional to simplified Chinese while preserving layout as much as possible.scripts/replace_pdf_cover.py: Replace a cover or other full-page image page without disturbing the rest of the PDF.references/workflow.md: Read for preflight checks, font choices, failure modes, and verification steps.
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决繁体PDF转简体的特定排版保持需求
- 适用于出版和文档处理等专业场景
亮点
- 触发描述完整覆盖多种使用变体
- 边界清晰不易误触
待提升项
-
缺少独立 When to Use 章节 原报告严重程度:轻微
使用场景说明已融入 Overview,但未设独立章节
改进建议:建议增加独立 When to Use 章节以提升可读性
-
缺少显式示例章节 原报告严重程度:轻微
示例已嵌入工作流步骤中,但未设独立 Examples 章节
改进建议:建议增加独立 Examples 章节集中展示典型用法
亮点
- 六步工作流结构清晰
- 包含验证出口条件
- 命令示例完整
亮点
- 提供隔离依赖环境安装脚本
- 覆盖scan-only文件等异常场景
- 关键操作有验证机制
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。