Workflow leaderboard / Research / PDF & document processing

OCR, translate and structure research PDFs

科研 PDF OCR、翻译与结构化

Research / 科研 PDF & document processing / 文献处理 flagship verified 2026-08-02

Convert scanned or mixed-language research PDFs into searchable PDFs plus structure-preserving translated Markdown and JSON artifacts.

Variants

Free & local / 免费本地 ~45 min setup

Works on macOS, Linux and Windows. Allow 8 GB RAM for ordinary papers and 16 GB RAM for large image-heavy PDFs. A local 8B translation model benefits from 8 GB or more unified memory or VRAM.

ComponentRolePriceLink
OCRmyPDF 17.8.1 deskew, OCR and searchable PDF/A or PDF output Free / 免费MPL-2.0 software; requires Tesseract and system PDF dependencieschecked 2026-08-02 https://github.com/ocrmypdf/OCRmyPDF/releases/tag/v17.8.1
Docling 2.117.0 layout-aware conversion to Markdown and structured JSON Free / 免费MIT software; local model downloads and compute are separatechecked 2026-08-02 https://github.com/docling-project/docling/releases/tag/v2.117.0
Ollama 0.32.5 with qwen3:8b local structure-preserving translation Free / 免费local runtime is free; verify the selected model license for your usechecked 2026-08-02 https://github.com/ollama/ollama/releases/tag/v0.32.5

Create searchable PDF and structured exports

uv venv --python 3.12 .venv
. .venv/bin/activate
uv pip install 'ocrmypdf==17.8.1' 'docling==2.117.0'
mkdir -p work/docling
ocrmypdf --deskew --clean --rotate-pages --output-type pdf input.pdf work/searchable.pdf
docling work/searchable.pdf --to md --to json --output work/docling
ollama pull qwen3:8b
jq -n --rawfile source work/docling/searchable.md '{model:"qwen3:8b",stream:false,options:{temperature:0},prompt:("Translate the following research document into Simplified Chinese. Preserve every Markdown heading, list, table, equation, citation key, URL, figure label and code block. Do not summarize. If a term is ambiguous, keep the original in parentheses. Output Markdown only.\n\n" + $source)}' | curl --fail-with-body -sS 'http://localhost:11434/api/generate' -H 'Content-Type: application/json' -d @- | jq -r '.response' > work/translated.zh.md

Docling batch manifest

input_dir: ./incoming_pdf
output_dir: ./structured_output
outputs:
  - searchable_pdf
  - markdown
  - json
ocr:
  languages: [eng, chi_sim]
translation:
  target_language: zh-CN
quality_gate:
  preserve_headings: true
  preserve_tables: true
  preserve_equations: true
  retain_source_artifacts: true

Known pitfalls

  • OCRmyPDF 17.8.1 may emit a regular PDF instead of PDF/A when embedded CJK fonts cannot be safely converted.
  • Use --output-type pdf when preservation matters more than archival PDF/A conformance.
  • Local LLM translation can alter numbers or citations. Diff tables, equations and reference identifiers before use.
  • Docling model downloads make the first run slower and require network access unless pre-cached.
Low budget / 低预算 ~30 min setup

Any machine with Docker and 8 GB RAM. OCR and layout stay local; only extracted Markdown is sent to DeepL if the API step is enabled.

ComponentRolePriceLink
OCRmyPDF Docker image 17.8.1 containerized searchable-PDF generation Free / 免费local container runtime and storage costs onlychecked 2026-08-02 https://ocrmypdf.readthedocs.io/en/latest/docker.html
Docling 2.117.0 local layout and table extraction Free / 免费open-source local processingchecked 2026-08-02 https://docling-project.github.io/docling/
DeepL API Developer or Growth v2 text translation API higher-quality document text translation Usage-based / 按用量计费unverified exact Growth subscription and overage rate; Developer has a stated 1,000,000-character total allowancechecked 2026-08-02 https://support.deepl.com/hc/en-us/articles/360021200939-DeepL-API-plans

Translate extracted Markdown through DeepL without losing the source

export DEEPL_API_KEY='paste_key_here'
export DEEPL_API_BASE='https://api.deepl.com'
cp work/docling/searchable.md work/source.en.md
test $(wc -c < work/source.en.md) -le 120000 || { echo 'Source exceeds the 128 KiB DeepL request limit; split it by Markdown sections first.' >&2; exit 1; }
jq -n --rawfile text work/source.en.md --arg target_lang ZH '{text:[$text],target_lang:$target_lang}' | curl --fail-with-body -sS "$DEEPL_API_BASE/v2/translate" -H "Authorization: DeepL-Auth-Key $DEEPL_API_KEY" -H 'Content-Type: application/json' -d @- > work/deepl-response.json
jq -e '.translations[0].text | length > 0' work/deepl-response.json >/dev/null
jq -r '.translations[0].text' work/deepl-response.json > work/translated.zh.md
test -s work/translated.zh.md && sha256sum work/searchable.pdf work/source.en.md work/translated.zh.md > work/SHA256SUMS

Known pitfalls

  • Legacy API Free and Pro plans can no longer be purchased; new users should verify Developer or Growth endpoint details in their account.
  • Sending raw Markdown as text does not guarantee perfect table preservation; validate complex tables manually.
  • The exact DeepL Growth charge is intentionally marked unverified.
  • Do not send confidential manuscripts to an external API without approval.
Cloud premium / 云端高配 ~60 min setup

No local accelerator required. Requires a Google Cloud project, billing, Cloud Storage and Document AI processor permissions.

ComponentRolePriceLink
Google Cloud Enterprise Document OCR Enterprise Document OCR processor v2 managed OCR with text and layout detection Usage-based / 按用量计费first 1,000 pages per account-month free, then $1.50 per 1,000 pages up to 5 million pageschecked 2026-08-02 https://cloud.google.com/products/document-ai/pricing
Google Cloud Layout Parser current managed processor structure extraction and initial chunking Usage-based / 按用量计费$10 per 1,000 pageschecked 2026-08-02 https://cloud.google.com/products/document-ai/pricing
DeepL API Growth v2 text translation API translated structured text Usage-based / 按用量计费unverified fixed subscription, included characters and overage rate; obtain the live quote in the DeepL accountchecked 2026-08-02 https://support.deepl.com/hc/en-us/articles/360021200939-DeepL-API-plans

Cloud pipeline contract

source:
  uri: gs://REPLACE_BUCKET/incoming/input.pdf
ocr:
  processor: enterprise_document_ocr_v2
  native_pdf_parsing: true
  enable_image_quality_scores: true
layout:
  processor: layout_parser
translation:
  provider: deepl_v2
  target_language: ZH
outputs:
  raw_document_ai_json: gs://REPLACE_BUCKET/artifacts/document-ai.json
  source_markdown: gs://REPLACE_BUCKET/artifacts/source.md
  translated_markdown: gs://REPLACE_BUCKET/artifacts/translated.zh.md
validation:
  require_page_count_match: true
  require_nonempty_tables: false
  retain_original: true

Human review checklist for translated structure

Compare the source PDF, OCR JSON and translated Markdown page by page. Report only verifiable defects. Check: page count, heading hierarchy, table row and column counts, equation symbols, units, decimal separators, in-text citations, reference identifiers, figure labels and untranslated fragments. For each defect return source page, artifact path, observed value, expected value and severity. Never invent missing text.

Known pitfalls

  • Document AI processors must be created in a supported region and IAM failures can look like empty processing results.
  • OCR, layout parsing, translation and storage are billed separately.
  • Layout Parser pricing does not include translation.
  • Keep raw processor JSON so structure extraction can be rerun without another OCR pass when possible.

Evidence