Document Automation Made Simple

Convert PDF to Word, Excel, and PowerPoint programmatically

Learn how to convert PDF files to editable Word, Excel, and PowerPoint documents programmatically. Extract tables to spreadsheets, convert scanned PDFs with built-in OCR, and control layout fidelity, with code samples in Python and C#.

Kostas, Developer

PDFs are great for sharing documents and terrible for editing them. When the data your application needs is locked inside a PDF - a contract to revise, a report full of tables, a deck to update - you need to convert it back into an editable format programmatically.

This guide shows how to convert PDF to Word, Excel, and PowerPoint files with a REST API: PDF to DOCX for editable documents, PDF to XLSX for extracting tables into spreadsheets, and PDF to PPTX for presentations - including scanned PDFs via built-in OCR.

Quick start: PDF to Word with one API call

curl -X POST https://v2.convertapi.com/convert/pdf/to/docx \
 -H "Authorization: Bearer api_token" \
 -F "File=@/path/to/document.pdf"

The response is an editable DOCX that preserves the original layout. Swap docx for xlsx or pptx in the URL and the same call produces a spreadsheet or a presentation.

Convert PDF to Word (DOCX)

The PDF to DOCX converter rebuilds the document so you can edit, amend, and share it without retyping anything. The Layout parameter controls how faithfully it follows the original:

  • flowing (default) - natural text flow that is easiest to edit
  • continuous - looser layout with fewer text boxes
  • exact - pixel-faithful positioning when visual fidelity matters most

Annotations can be carried over or skipped with the Annotations parameter, and PageRange converts only the pages you need (for example 1,5,7-10).

Extract tables from PDF to Excel (XLSX)

Tabular data locked in PDFs - invoices, financial reports, data sheets - becomes usable again once it lands in a spreadsheet. The PDF to XLSX converter detects tables and extracts them into rows and columns, with parameters built for real-world data work:

  • SingleSheet - combine every extracted table into one sheet instead of one sheet per table
  • IncludeFormatting - also carry over non-table content like images and paragraphs (off by default, so you get clean data)
  • DecimalSeparator and ThousandsSeparator - resolve 1.250,00 vs 1,250.00 ambiguity when processing documents from different locales
curl -X POST https://v2.convertapi.com/convert/pdf/to/xlsx \
 -H "Authorization: Bearer api_token" \
 -F "File=@/path/to/report.pdf" \
 -F "SingleSheet=true"

Convert PDF to PowerPoint (PPTX)

The PDF to PPTX converter turns each page into an editable slide - useful for reviving old decks that only survive as PDFs. Fonts can be embedded into the output so slides render identically on machines without the original fonts installed.

Scanned PDFs: OCR is built in

All three converters share the same OCR engine for image-based documents, controlled by OcrMode:

  • auto (default) - text-based pages are converted directly, and scanned pages go through OCR
  • force - OCR everything, useful when the embedded text layer is broken
  • never - skip OCR entirely for guaranteed-digital documents

Set OcrLanguage when your documents are not in English, and pass Password for protected files - both work across DOCX, XLSX, and PPTX targets.

Convert PDF to Word in Python

pip install convertapi
import convertapi

convertapi.api_credentials = 'api_token'

convertapi.convert('docx', {
    'File': '/path/to/contract.pdf',
    'Layout': 'exact'
}, from_format = 'pdf').save_files('/path/to/editable')

Extract PDF tables to Excel in Python

import convertapi

convertapi.api_credentials = 'api_token'

convertapi.convert('xlsx', {
    'File': '/path/to/invoice.pdf',
    'SingleSheet': True,
    'DecimalSeparator': 'comma'
}, from_format = 'pdf').save_files('/path/to/data')

Convert PDF to Word in C#

Install the ConvertAPI .NET SDK from NuGet:

dotnet add package ConvertApi
using ConvertApiDotNet;

var convertApi = new ConvertApi("api_token");

var result = await convertApi.ConvertAsync("pdf", "docx",
    new ConvertApiFileParam(@"C:\docs\contract.pdf"),
    new ConvertApiParam("OcrMode", "auto")
);

await result.SaveFilesAsync(@"C:\docs\editable");

The same pattern works in PHP, Java, Node.js, Go, and Ruby - every SDK exposes the identical parameters.

Try it yourself: download the sample files

We ran three real documents through the converters with default settings - no tuning - each matched to the format it is typically converted to. Every download below is an actual input or output of the API.

Word demo: a two-page operations report - headings, paragraphs, lists, and a data table - the kind of document you get as a PDF but need back in Word:

Sample report PDF used in the Word demo

Excel demo: a one-page invoice with three tables - the classic table-extraction case:

Sample invoice PDF used in the Excel demo

PowerPoint demo: a four-slide business deck that exists only as a PDF - the everyday case for PDF to PPTX:

Slide from the sample deck PDF

Frequently asked questions

How do I extract tables from a PDF programmatically?

Post the file to the pdf/to/xlsx endpoint. Tables are detected and extracted into spreadsheet rows and columns automatically. Use SingleSheet to merge them and DecimalSeparator to handle regional number formats. For scanned documents, OCR kicks in automatically.

Can I convert scanned PDFs to editable Word or Excel files?

Yes. OCR is built into all three converters and enabled by default (OcrMode=auto). Set OcrLanguage for non-English documents.

Can I convert a password-protected PDF?

Yes. Pass the document password in the Password parameter with any of the three converters.

Can I convert only specific pages?

Yes. PageRange accepts single pages, ranges, and combinations like 1,5,7-10 on all three endpoints.

How faithful is the converted layout?

For DOCX you choose the trade-off yourself with Layout: flowing optimizes for easy editing, exact for visual fidelity. Try your own documents in the interactive demo on each converter page to judge the quality first-hand.

Conclusion

Converting PDFs back into editable Word, Excel, and PowerPoint files is a single HTTP call per format - with OCR, table extraction, and layout control handled by parameters instead of your own parsing code. Start with the PDF to DOCX, PDF to XLSX, or PDF to PPTX page - each generates a working code snippet for your language while you experiment.


Related converters

Ready to Streamline Your File Conversions?