Home
cd ../playbooks
File OrganizationIntermediate

PDF to Word Converter

Convert PDF files to editable Word documents using pdf2docx

10 minutes
By communitySource
#pdf#docx#conversion

Your client sent the contract as a PDF and you need to redline it in Word. The free online converters butcher the formatting — tables break, fonts change, and images shift to random positions. You need a clean conversion that preserves the original layout.

Who it's for: legal professionals converting contracts for redlining and markup, business analysts editing PDF reports in Word, administrative staff converting received PDFs to editable documents, procurement teams modifying vendor agreements, anyone who regularly needs to edit documents originally shared as PDFs

Example

"Convert this PDF proposal to Word so I can edit it" → Clean DOCX with preserved formatting, tables intact and editable, fonts matched to originals, images in correct positions, and headers/footers maintained — ready for Track Changes

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add pdf-to-docx
# PDF to Word

## Overview

This workflow enables conversion from PDF to editable Word documents using **pdf2docx** - a Python library that preserves layout, tables, images, and text formatting. Unlike OCR-based solutions, pdf2docx extracts native PDF content for accurate conversion.

## How to Use

1. Provide the PDF file you want to convert
2. Optionally specify pages or conversion options
3. I'll convert it to an editable Word document

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

This workflow enables conversion from PDF to editable Word documents using pdf2docx - a Python library that preserves layout, tables, images, and text formatting. Unlike OCR-based solutions, pdf2docx extracts native PDF content for accurate conversion.


Quick Start

Step 1: Create a Project Folder

mkdir -p ~/Documents/PdfToDocx

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ~/Documents/PdfToDocx/

Step 3: Start Working

cd ~/Documents/PdfToDocx
claude

How to Use

  1. Provide the PDF file you want to convert
  2. Optionally specify pages or conversion options
  3. I'll convert it to an editable Word document

Example prompts:

  • "Convert this PDF report to an editable Word document"
  • "Turn pages 1-5 of this PDF into Word format"
  • "Extract this scanned document as editable text"
  • "Convert this PDF contract to Word for editing"

Best Practices

  1. Check PDF Type: Native PDFs convert better than scanned
  2. Preview First: Test with a few pages before full conversion
  3. Handle Tables: Complex tables may need manual adjustment
  4. Image Quality: Images are extracted at original resolution
  5. Font Handling: Some fonts may substitute to system defaults

Examples

Example 1: Contract Conversion

from pdf2docx import Converter
import os

def convert_contract(pdf_path):
    """Convert contract PDF to editable Word with metadata."""
    
    # Define output path
    base_name = os.path.splitext(pdf_path)[0]
    output_path = f"{base_name}_editable.docx"
    
    # Convert
    cv = Converter(pdf_path)
    
    # Check page count
    page_count = len(cv.pages)
    print(f"Processing {page_count} pages...")
    
    # Convert all pages
    cv.convert(output_path)
    cv.close()
    
    print(f"Created: {output_path}")
    print(f"File size: {os.path.getsize(output_path) / 1024:.1f} KB")
    
    return output_path

# Usage
result = convert_contract('contract.pdf')

Example 2: Selective Page Conversion

from pdf2docx import Converter

def convert_selected_pages(pdf_path, page_ranges, output_path):
    """Convert specific page ranges to Word.
    
    page_ranges: List of tuples like [(1, 3), (5, 7)] for pages 1-3 and 5-7
    """
    cv = Converter(pdf_path)
    
    # Convert pages (0-indexed internally)
    all_pages = []
    for start, end in page_ranges:
        all_pages.extend(range(start - 1, end))  # Convert to 0-indexed
    
    cv.convert(output_path, pages=all_pages)
    cv.close()
    
    print(f"Converted pages: {page_ranges}")
    return output_path

# Convert pages 1-5 and 10-15
convert_selected_pages(
    'long_document.pdf',
    [(1, 5), (10, 15)],
    'selected_pages.docx'
)

Example 3: PDF Report to Editable Template

Limitations

  • Scanned PDFs require OCR preprocessing
  • Complex layouts may not convert perfectly
  • Some fonts may not be available
  • Watermarks are included in conversion
  • Protected/encrypted PDFs need password

Installation

pip install pdf2docx

# For image handling
pip install Pillow

$Related Playbooks

File Organization

PDF Watermark Tool

Add watermarks, page numbers, headers, and footers to PDFs

10 minutes
Intermediate
File Organization

Project Inventory & Documentation

Analyze project folders to understand what each does, identify tech stacks, and create documented inventories.

10 minutes
Intermediate
File Organization

Photo Organizer by Event

Organize photos by reading EXIF metadata and analyzing content to create Year > Month > Event folder structures automatically.

5 minutes
Beginner
File Organization

Office to Markdown Converter

Convert Office documents to Markdown for version control and AI processing using Microsoft's markitdown.

10 minutes
Advanced
File Organization

PDF Compression Tool

Reduce PDF file size while maintaining acceptable quality

10 minutes
Intermediate
File Organization

Universal PDF Converter

Convert PDF files to and from Word, Excel, Image, and other formats

10 minutes
Intermediate
File Organization

PDF Text & Table Extractor

Extract text, tables, and metadata from PDFs using pdfplumber

10 minutes
Beginner
File Organization

PDF Form Auto-Filler

Fill out PDF forms programmatically and extract form data

10 minutes
Advanced
File Organization

PDF Merge & Split Tool

Combine multiple PDFs or split into separate files

10 minutes
Intermediate
File Organization

PDF OCR Scanner

Extract text from scanned PDFs using optical character recognition

10 minutes
Beginner
File Organization

Recover Lost Code from Claude Code Sessions

Lost code when a Claude Code session ended? A recovery workflow that scans the session files in ~/.claude/, finds the code Claude wrote by date or keyword, and re-applies it to your project.

5 minutes
Beginner
File Organization

Old File Cleanup Assistant

Identify safely deletable old files with intelligent recommendations based on age, type, and usage patterns.

5 minutes
Beginner

Browse all File Organization playbooks →