explaingit

coderlim/translate-pdf-skill

Analysis updated 2026-05-18

0PythonAudience · writerComplexity · 2/5Setup · easy

TLDR

A Python script and Codex skill that translates text-based PDFs into readable Chinese PDFs while preserving product names and acronyms.

Mindmap

mindmap
  root((translate-pdf-skill))
    What it does
      Extracts and translates PDF text
      Rebuilds a Chinese PDF
      Protects glossary terms
    Tech stack
      Python
      pypdf
      reportlab
    Use cases
      Translate documents to Chinese
      Keep product names untranslated
    Audience
      Writers
      Researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Translate an English PDF report or guide into a readable Chinese PDF for internal review.

USE CASE 2

Protect product names and acronyms from being mistranslated using a glossary file.

USE CASE 3

Cache translated text blocks to avoid re-translating unchanged content.

USE CASE 4

Supply a custom font or title when rebuilding the translated PDF.

What is it built with?

Pythonpypdfreportlabdeep-translator

How does it compare?

coderlim/translate-pdf-skill0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultyeasymoderatehard
Complexity2/54/51/5
Audiencewriterdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Only works on PDFs with a selectable text layer, scanned PDFs need OCR first. Auto-installs deep-translator if missing.

No license file was found in the README.

In plain English

translate-pdf-skill is a Python script and accompanying Codex skill definition for translating text-based PDF files into Chinese and producing a new readable Chinese PDF. It is designed for PDFs that already contain a selectable text layer, not scanned images, and prioritises readability of the output over pixel-perfect reproduction of the original layout. The workflow has five steps: extract text from the source PDF using pypdf, clean up line-break artifacts and layout noise, protect product names and acronyms so they are not accidentally translated, translate the text blocks using a translation library with caching to avoid re-translating the same content, and finally rebuild the output as a new PDF using reportlab. Optional flags let you supply a custom cache file, a glossary file for terminology control, a custom title, and a custom font file. The repository also includes minimal unit tests for block parsing and heading detection, a terminology guidance file for protected terms, and example artifacts showing an English founders playbook alongside its generated Chinese equivalent. You would use this tool when you have an English PDF, such as a document, guide, or report, and need a Chinese version quickly for internal review. It is not suited for scanned PDFs without an OCR step, and complex tables or heavily designed pages may need manual cleanup after translation. The script auto-installs the deep-translator package locally if it is not already present.

Copy-paste prompts

Prompt 1
Help me run this script to translate an English PDF report into Chinese.
Prompt 2
How do I set up a glossary file so product names are not translated?
Prompt 3
Explain the five-step workflow this tool uses to go from source PDF to translated PDF.
Prompt 4
Can this tool handle scanned PDFs, or does it need a text layer already present?

Frequently asked questions

What is translate-pdf-skill?

A Python script and Codex skill that translates text-based PDFs into readable Chinese PDFs while preserving product names and acronyms.

What language is translate-pdf-skill written in?

Mainly Python. The stack also includes Python, pypdf, reportlab.

What license does translate-pdf-skill use?

No license file was found in the README.

How hard is translate-pdf-skill to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is translate-pdf-skill for?

Mainly writer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.