设计与多媒体

PDF to Word Review

试用

Convert PDF to editable Word and automatically verify the conversion quality. Runs a four-way reconciliation (character count, table count, image count, table-cell count) plus a page-count reference after conversion, so content loss or redundancy is surfaced as evidence instead of guesswork. Use when the user asks to convert PDF to Word, convert PDF to docx, check conversion quality, verify a converted document, or worries that PDF-to-Word conversion dropped content.

它能做什么

Convert PDF to editable Word and automatically verify the conversion quality. Runs a four-way reconciliation (character count, table count, image count, table-cell count) plus a page-count reference after conversion, so content loss or redundancy is surfaced as evidence instead of guesswork. Use when the user asks to convert PDF to Word, convert PDF to docx, check conversion quality, verify a converted document, or worries that PDF-to-Word conversion dropped content.

技能文档

PDF → Word Conversion + Automatic Quality Review

Overview

Convert a PDF into an editable Word document, then automatically audit the conversion — reconciling character count, table count, image count, and table-cell count, turning "did the conversion drop anything?" from a feeling into evidence. That is the differentiator versus plain PDF converters: they only convert; this one also tells you where the conversion may have gone wrong.

The underlying engine is the standalone open-source project pdf2word-review (AGPL-3.0, GitHub: https://github.com/xiyanjun/pdf-to-word-review ). This skill is a thin wrapper: it calls the tool and interprets results, and does not vendor any engine code.

Installation

Check whether the CLI is available first:

pdf2word --help >/dev/null 2>&1 && echo "installed" || echo "need install"

If missing, install (GitHub direct install works even before the PyPI release):

# Option 1: PyPI (after official release)
pip install pdf2word-review

# Option 2: GitHub direct install (works today, recommended)
pip install git+https://github.com/xiyanjun/pdf-to-word-review.git

Only four lightweight core dependencies are pulled in automatically (pdf2docx, PyMuPDF, python-docx, lxml). OCR is optional — see "Scanned PDF OCR".

Workflow

Step 1: Confirm the input

  • Verify the user's path exists and is a .pdf.
  • Batch mode: multiple PDFs are supported in one pass.

Step 2: Convert (auto-routed)

pdf2word  -o  --verify --html

The CLI detects the text layer and routes automatically:

CaseAutomatic behavior
Has text layerconvert → empty-paragraph cleanup → layout polish
No text layer (scanned)OCR rebuild

Key flags:

FlagEffect
-o Output docx path (single file only)
--verifyCore: run the four-way reconciliation after conversion
--htmlGenerate a diff-visualization HTML report (.report.html)
--report Write the review report to JSON (array in batch mode)
--force-ocrForce OCR rebuild
--engine auto/vision/paddleOCR backend (default auto: Vision on macOS, else PaddleOCR)
--no-cleanSkip empty-paragraph cleanup
--no-polishSkip layout polish (use on non-macOS, see Notes)

Step 3: Quality review (the differentiator)

--verify runs a four-way reconciliation, each item reporting PDF value → Word value delta and a status:

ItemWhat it checks
Character countNon-whitespace characters (unified PDF/Word metric)
Table countTables in source PDF vs target Word
Image countCounted via Word a:blip references (avoids media false positives)
Table-cell countrow×col reconciliation (catches split/merged tables)

Page count is reference-only (Word pagination varies with layout).

Step 4: Interpret and report

Always translate the result into plain language — never dump raw JSON at the user. See "Result Interpretation".

Result Interpretation

Each item's status is one of four values:

statusMeaningSeverityHow to report
okConsistentNoneNo need to dwell on it
lossContent lost (Word < PDF)🔴 HighTell the user exactly what and how much
extraRedundant (Word > PDF)🟡 VerifyFlag as suspected redundancy; <5% extra chars is normal, not flagged
convertedImage→text substitution (images down, chars up)🟢 ExpectedExplain: layout polish turned a banner image into a heading — not loss

Report template (conclusion first, then detail):

✅/⚠️ Conversion result: {passed / N items to review}

| Item | PDF | Word | Delta | Verdict |
|------|-----|------|-------|---------|
| Chars | ... | ... | ... | ✅/❌ |
| Tables | ... | ... | ... | ✅/❌ |
| Images | ... | ... | ... | ✅/❌ |
| Table cells | ... | ... | ... | ✅/❌ |

{list each loss/extra with risk note and fix suggestion}

Key points:

  • Any loss or extra must be called out by name — never say "might have issues" vaguely.
  • When converted appears, proactively explain it is expected behavior to avoid false alarm.
  • If --html was used, give the user the HTML report path (visual diff is clearer than text).

Scanned PDF OCR

Scanned PDFs (no text layer) are auto-routed to OCR rebuild. OCR has two backends, both optional, neither installed by default:

BackendPlatformInstall
macOS VisionmacOS onlypip install pyobjc-framework-Vision pyobjc-framework-Quartz (lightweight, system framework)
PaddleOCRCross-platformpip install paddleocr paddlepaddle (heavier; downloads CN/EN models on first run)
  • macOS user processing scans → install Vision.
  • Non-macOS → install PaddleOCR.
  • Without OCR deps, scanned conversion errors out with an install hint — relay that hint to the user honestly.
  • After OCR rebuild, char/image reconciliation does not apply (source has no text layer); rely on the OCR confidence report instead — flag text blocks with confidence < 0.7 for manual review.

Notes

  1. Layout polish requires macOS: banner OCR + list-item fixes need system Vision/Quartz. On non-macOS, add --no-polish.
  2. AGPL-3.0 boundary: this skill is a thin wrapper — it only calls the external package and vendors no AGPL code. To change engine logic, open a PR upstream (GitHub) rather than copying code into the skill.
  3. Batch: pdf2word a.pdf b.pdf c.pdf --verify --report result.json writes to each file's directory; --report yields a result array.
  4. Char-count tolerance: <5% extra chars is normal (symbol substitution/formatting); >5% flags redundancy. >2% char loss raises a separate warning.

License

Thin wrapper. The underlying pdf2word-review engine is AGPL-3.0. See https://github.com/xiyanjun/pdf-to-word-review

相关技能

将 PDF 和图片转换为 10 种文档或数据格式,并提供 OCR 与版面分析控制。

作者 ComPDF32 次安装95 星标

基于 ComPDFKitConversion SDK,把 PDF 或图片转换为 Word、Excel、PPT、HTML 等 10 种可编辑格式。

45 次安装97 星标

Convert PDF documents to PowerPoint presentations via GoAI API. Use when the user asks to convert PDF to PPT, turn a PDF into slides, make a presentation fro...

13 次安装

Convert unstructured documents into LLM-ready structured data. Supports PDF, Word, PPT, and images; extracts paragraphs, formulas, tables, charts, and other...

15 次安装1 星标