Pdf Trad To Simp Preserve Layout logo

Pdf Trad To Simp Preserve Layout

Community
superpilot69
pdf-trad-to-simp-preserve-layout

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.

Overview

Publishersuperpilot69
Repositorypdf-trad-to-simp-preserve-layout-kit
Skill namepdf-trad-to-simp-preserve-layout
Stars
118
Forks
18
Bundled files
8
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by superpilot69 on GitHub. Read the source before you install it.

Installation

Install the Pdf Trad To Simp Preserve Layout AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/superpilot69/pdf-trad-to-simp-preserve-layout-kit/tree/main/skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/superpilot69/pdf-trad-to-simp-preserve-layout-kit.git /tmp/pdf-trad-to-simp-preserve-layout-kit
mkdir -p .claude/skills
cp -r /tmp/pdf-trad-to-simp-preserve-layout-kit/skill .claude/skills/pdf-trad-to-simp-preserve-layout
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pdf Trad To Simp Preserve Layout in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pdf Trad To Simp Preserve Layout on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pdf Trad To Simp Preserve Layout is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

  1. 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.
  1. 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.ttc with scripts/extract_ttc_font.py, or let the converter auto-detect it.
  1. Install the bundled dependencies once.
bash
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"
  1. Convert the text layer without rebuilding the book.
bash
python "$SKILL_DIR/scripts/convert_pdf_t2s_preserve_layout.py" \
  input.pdf output.pdf \
  --font-style light
  • Pass --font-path /path/to/font.ttf if you already have a suitable full font.
  • Pass --font-ttc /path/to/Songti.ttc --font-style regular to override automatic font discovery.
  • Use --font-size-scale or --baseline-y-shift only for small visual tuning passes.
  1. Replace image-only cover pages separately when needed.
bash
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.
  1. 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 .ttc collection.
  • 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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pdf Trad To Simp Preserve Layout AI skill do?

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.

Why use Pdf Trad To Simp Preserve Layout on TypingMind?

Because you install it once and use it with any model. Pdf Trad To Simp Preserve Layout is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pdf Trad To Simp Preserve Layout in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/superpilot69/pdf-trad-to-simp-preserve-layout-kit/tree/main/skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pdf Trad To Simp Preserve Layout?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pdf Trad To Simp Preserve Layout?

As many as you like. As long as a model supports skills, you can use Pdf Trad To Simp Preserve Layout with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pdf Trad To Simp Preserve Layout AI skill free?

It is published on GitHub by superpilot69. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇