Who it is forA business or bid team member translating a tender, qualification certificate or contract who wants an AI agent to run the full workflow.
The problemA general translation tool can break tables, clause numbering and page size, and a model may rewrite or drop clauses without warning.
The outcomeA translated PDF in the original page layout, with a clause and number audit report and a comparison image set.
What you need first
- Python with pip installed
- Git to clone the repository
- Playwright Chromium installed with `playwright install chromium`, or Microsoft Edge on Windows
- The original PDF to translate or audit
- An AI agent or language model that can write HTML and run Python commands, if you want the translation step done for you
Steps
- Clone the repository into your coding agent's skill folder, for Claude Code use
git clone https://github.com/lxsssssss/pdf-translate.git .claude/skills/pdf-translate. - Install dependencies with
pip install -r requirements.txtandplaywright install chromiuminside the cloned folder. - Ask the agent to translate your PDF into the target language, keep its layout and output a PDF, following SKILL_EN.md.
- Let the agent render its HTML with
python scripts/render_pdf.py input.html output.pdf --strict-overflow. - Let the agent audit the result with
python scripts/audit_pdf.py --src original.pdf --tgt output.pdf --strict --json audit_report.jsonand review any failures. (inferred, check the README)
Prompt for your agent
Using the pdf-translate skill in .claude/skills/pdf-translate, translate <original.pdf> into <target language> while keeping its layout, following SKILL_EN.md. Render the HTML with scripts/render_pdf.py using --strict-overflow, then audit the output against <original.pdf> with scripts/audit_pdf.py using --strict and --json audit_report.json. Verify that the audit report shows matching page count and page sizes before you say the job is done.
Caveat. The README describes the translation as written by the agent under SKILL_EN.md, so output quality depends on the model and still needs human review before official use.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer