{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "lxsssssss-pdf-translate--agent-translates-official-pdf-with-layout-kept",
 "repo": "lxsssssss/pdf-translate",
 "repo_url": "https://github.com/lxsssssss/pdf-translate",
 "repo_slug": "lxsssssss-pdf-translate",
 "title": "Have an AI agent translate an official PDF and keep its layout",
 "page_title": "How to have an AI agent translate an official PDF and keep its layout with PDF Translate",
 "summary": "Use the skill's two-stage SOP so an agent extracts clauses first, then renders and audits the result.",
 "who": "A business or bid team member translating a tender, qualification certificate or contract who wants an AI agent to run the full workflow.",
 "problem": "A general translation tool can break tables, clause numbering and page size, and a model may rewrite or drop clauses without warning.",
 "outcome": "A translated PDF in the original page layout, with a clause and number audit report and a comparison image set.",
 "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.txt` and `playwright install chromium` inside 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.json` and review any failures. (inferred, check the README)"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "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.",
 "category": "Work and operations",
 "tags": [
  "Work and operations"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lxsssssss-pdf-translate/agent-translates-official-pdf-with-layout-kept/",
 "md": "https://dedupedai.com/use-cases/lxsssssss-pdf-translate/agent-translates-official-pdf-with-layout-kept/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lxsssssss-pdf-translate--agent-translates-official-pdf-with-layout-kept.json",
 "api_version": "v1"
}
