salvage-pdf-to-word

Rebuild unreliable PDF layouts into faithful DOCX documents.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Wkayaobama/wkayaobama-skills --skill salvage-pdf-to-word
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salvage-pdf-to-word
Source: https://github.com/Wkayaobama/wkayaobama-skills/tree/main/skills/salvage-pdf-to-word
Command: npx skills add https://github.com/Wkayaobama/wkayaobama-skills --skill salvage-pdf-to-word

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, mammoth, pdfjs-dist, sharp, pypdfium2, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill fixes the common failure mode where converting unstructured, untagged, or form-like PDFs to Word produces garbled reading order and flattened layouts.

Core Features & Use Cases

  • Parametric PDF salvage pipeline: Converts a structurally-unreliable PDF into a faithful DOCX by rebuilding layout from vector text/rectangle geometry, rather than trusting PDF tags.
  • Config-driven pattern authoring per document family: Lets you define a per-corpus config.json (labels, regexes, thresholds, styles) so the same pipeline works across different document types by swapping the pattern vocabulary.
  • Auditable intermediate representations: Writes output.ir.json to make classification and block formation inspectable while you iterate.
  • Fast visual + preview feedback loop: Produces ground-truth PNG slices of the rendered page and generates a browser preview from the DOCX for sanity checking.

Quick Start

Use the salvage-pdf-to-word skill to convert your messy, untagged PDF into a structured DOCX while iterating on a per-corpus config until the preview matches the visual slices.

Frequently Asked Questions about salvage-pdf-to-word

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert messy, untagged PDF forms to DOCX without garbled reading order?

To convert messy PDF forms to DOCX, this Skill rebuilds the visual layout from vector text and rectangle geometry rather than trusting PDF tags, ensuring the output DOCX maintains the original structural fidelity.

What is the best way to extract layout and checkboxes from scanned PDF documents into Word?

Extracting layouts and checkboxes from scanned PDFs into Word is handled by a parametric salvage pipeline that clusters lines and groups blocks from vector geometry, reconstructing complex forms into a structured DOCX file.

Can I use a custom config to parse multi-column PDF sections and coded subsections into DOCX?

Yes, you can parse multi-column PDF sections into DOCX using a config-driven pattern authoring approach, defining per-corpus labels, regexes, and thresholds to classify and rebuild different document families accurately.

Does this PDF to DOCX conversion approach require OCR?

This PDF to DOCX conversion does not require OCR; it acts as an OCR-alternative by directly parsing vector PDF operator geometry and text items in top-left coordinate space to reconstruct the document structure.

How do I debug PDF to DOCX layout reconstruction when blocks are misaligned?

To debug PDF to DOCX layout misalignment, the pipeline writes an auditable intermediate representation JSON and generates PNG slices with HTML previews, allowing you to inspect classification and iterate on your config.

What libraries are needed to reconstruct PDF visual layouts into Word documents?

Reconstructing PDF visual layouts into Word documents requires libraries including pdfjs-dist and pypdfium2 for vector parsing, sharp and Pillow for image slicing, and docx with mammoth for DOCX emission and previewing.