pdf-trad-to-simp-preserve-layout
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pdf-trad-to-simp-preserve-layout" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6dab2861a30569886fdb1df9647fe8eda425557a747cda7b6761df6c15572460. Verify the upstream source and version against https://github.com/superpilot69/pdf-trad-to-simp-preserve-layout-kit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Convert Traditional Chinese PDF to Simplified Chinese while preserving page dimensions, images, selectable text, and overall layout as much as possible. Intended for scenarios that require converting the source PDF without rebuilding the book or altering images and original structure, for example replacing an image-only cover or adjusting body text fonts after replacing the text layer.
Introduction source: third_party · superpilot69 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
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.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决繁体PDF转简体的特定排版保持需求
- 适用于出版和文档处理等专业场景
Highlights
- 触发描述完整覆盖多种使用变体
- 边界清晰不易误触
Areas to improve
-
缺少独立 When to Use 章节 Reported severity: Minor
使用场景说明已融入 Overview,但未设独立章节
Recommendation: 建议增加独立 When to Use 章节以提升可读性
-
缺少显式示例章节 Reported severity: Minor
示例已嵌入工作流步骤中,但未设独立 Examples 章节
Recommendation: 建议增加独立 Examples 章节集中展示典型用法
Highlights
- 六步工作流结构清晰
- 包含验证出口条件
- 命令示例完整
Highlights
- 提供隔离依赖环境安装脚本
- 覆盖scan-only文件等异常场景
- 关键操作有验证机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.