pdf-document-translation

Translate PDF documents between English and Simplified Chinese while preserving layout.

Updated May 9, 2026
One-click install
npx skills add https://github.com/Jack5316/translation_codex_skill --skill pdf-document-translation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-document-translation
Source: https://github.com/Jack5316/translation_codex_skill/tree/main
Command: npx skills add https://github.com/Jack5316/translation_codex_skill --skill pdf-document-translation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pymupdf, pdfminer.six, beautifulsoup4, playwright, weasyprint, codex, pdf2htmlEX, and includes scripts (resource) components.

What problem does it solve?

It solves the problem of translating long PDF documents while preserving the original layout, figures, and tables so the output remains readable and structurally consistent.

Core Features & Use Cases

  • Layout-preserving pipeline: analyzes the PDF, converts it to an editable intermediate HTML/CSS layer, translates text, figures, and tables separately, then rebuilds the final PDF.
  • Terminology binding: generates a document-specific terms.md before translation and forces later stages to use it consistently.
  • Binary layout QA gate: runs 16 objective pass/fail checks (G01–G16) and refuses delivery unless every check passes, with clear failure routing.
  • Checkpointed, resumable stages: each stage writes intermediates under work/ so you can re-run only what failed instead of restarting.

Quick Start

Point Codex CLI at this skill directory and ask to translate your PDF into Simplified Chinese with strict layout priority.

Frequently Asked Questions about pdf-document-translation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I translate a PDF to Simplified Chinese while preserving figures and tables?

This tool translates full PDF documents to Simplified Chinese by converting them into editable HTML intermediates, translating each layer, and rebuilding a final PDF that preserves the original layout, figures, and tables.

What is terminology binding in PDF translation and why does it matter?

Terminology binding in PDF translation generates a document-specific terms.md file before translating any layer, forcing later stages to use consistent terminology throughout the final output for accurate and professional results.

Can I translate scanned PDFs or do I need text-based PDFs only?

You can translate scanned PDFs because the workflow supports text-based, scanned, and mixed PDFs, automatically choosing the appropriate processing route via document analysis before starting the HTML rebuild.

How do I resume a failed PDF translation pipeline without starting over?

To resume a failed PDF translation pipeline without starting over, each stage writes checkpointed intermediates under the work directory, allowing you to re-run only the specific failed stage instead of restarting the entire workflow.

Does the PDF translation workflow enforce quality checks before delivering the final file?

The PDF translation workflow enforces a binary QA gate requiring all 16 objective pass/fail checks (G01–G16) to pass before delivery, refusing output and providing clear failure routing if any check fails.

What's the best way to handle complex PDF layout translation using Python tools?

The best way to handle complex PDF layout translation is using a deterministic multi-stage workflow that leverages pdfplumber and weasyprint to extract content, translate layers, and rebuild HTML into a structurally consistent PDF.