Skip to main content

English | 简体中文 | 繁體中文 | 日本語

pdf2ppt

PyPI version Python License: MIT GitHub stars

Convert PDF Slides to PowerPoint Presentations with Vector Graphics (highest resolution).

✨ Features

  • 🎯 Vector Graphics - Maintains highest resolution in generated PPT
  • 📝 Metadata Conversion - Preserves title, author and other metadata
  • 📐 Auto Detection - Automatically detects slide size and aspect ratio
  • 🚀 Easy to Use - Simple command line interface with beautiful output
  • 📄 Page Selection - Convert specific pages with --pages option
  • ⚡ Parallel Processing - Speed up conversion with --parallel option
  • 🔍 Dependency Check - Automatically checks for required tools
  • 🎨 Web UI - Modern web interface with drag-and-drop support
  • 📡 REST API - FastAPI server with async processing
  • 🔧 MCP Support - Model Context Protocol for AI integration
  • 🐳 Docker Ready - All-in-one Docker image available

🎯 Motivation

  • LaTeX users can easily convert beamer slides from PDF to PPT
  • Typst users can easily convert touying slides from PDF to PPT

🚀 Quick Start

Option 1: Command Line (pipx)

# Install via pipx (recommended)
pipx install pdfslides2ppt

# Convert PDF to PPT
pdf2ppt input.pdf output.pptx

Option 2: Web UI (Docker)

# Pull and run
docker run -d -p 8000:8000 neosun/pdf2ppt:latest

# Access at http://localhost:8000

Option 3: API Server

# Install with server dependencies
pip install "pdfslides2ppt[server]"

# Start server
python -m uvicorn web.app:app --host 0.0.0.0 --port 8000

📦 Installation

Prerequisites

  • Python >= 3.9
  • pdf2svg - for PDF to SVG conversion
  • Inkscape - for SVG to EMF conversion

Install Dependencies

macOS:

brew install pdf2svg inkscape

Ubuntu/Debian:

sudo apt-get install pdf2svg inkscape

Windows:

Install pdf2ppt

# Recommended: Install with pipx (isolated environment)
pipx install pdfslides2ppt

# Or install with pip
pip install pdfslides2ppt

📖 Usage

Basic Usage

# Specify output file
pdf2ppt input.pdf output.pptx

# Auto-generate output filename (input.pptx)
pdf2ppt input.pdf

# Verbose mode
pdf2ppt input.pdf --verbose

Advanced Usage

# Convert specific pages
pdf2ppt input.pdf -p 1-5,7,9-11

# Parallel processing (4 workers)
pdf2ppt input.pdf -j 4

# Force overwrite existing file
pdf2ppt input.pdf output.pptx --force

# Keep temporary files for debugging
pdf2ppt input.pdf --no-clean

Command Line Options

usage: pdf2ppt [-h] [-v] [--verbose] [--no-clean] [--no-check] [--force]
               [--pages PAGES] [--parallel PARALLEL]
               [--pdf2svg-path PATH] [--inkscape-path PATH]
               input [output]

positional arguments:
  input                 Input PDF file
  output                Output PPTX file (default: input.pptx)

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --verbose             Verbose output
  --no-clean            Keep temporary files
  --no-check            Skip SVG filter check
  --force, -f           Overwrite output file if exists
  --pages, -p PAGES     Page range (e.g., "1-5,7,9-11")
  --parallel, -j N      Parallel workers (default: 1)
  --pdf2svg-path PATH   Path to pdf2svg executable
  --inkscape-path PATH  Path to inkscape executable

🔧 Technical Implementation

  1. Convert PDF to SVG using pdf2svg
  2. Convert SVG to EMF using inkscape (due to python-pptx limitations)
  3. Insert EMF into PPT using python-pptx

🛠️ Tech Stack

Component Technology
Language Python 3.9+
PDF Processing pypdf
PPT Generation python-pptx
PDF to SVG pdf2svg
SVG to EMF Inkscape
CLI Output rich

⚠️ Known Issues

Transparent Background

Elements with transparency are not fully supported due to dependency limitations. You will receive a warning when such issues are detected. You can manually copy the generated SVG to fix the problem.

See #1 for more details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright © 2023-2024 Teddy van Jerry (Wuqiong Zhao)

⭐ Star History

Star History Chart

📱 Follow Us

WeChat

Metadata

Release files for pdfslides2ppt 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfslides2ppt 1.2.0
File Size Uploaded Provenance Actions
pdfslides2ppt-1.2.0.tar.gz 10.5 kB Without provenance Details for pdfslides2ppt-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pdfslides2ppt 1.2.0
File Interpreter ABI Platform Actions
pdfslides2ppt-1.2.0-py3-none-any.whl Python 3 none any Details for pdfslides2ppt-1.2.0-py3-none-any.whl

Total release size: 18.6 kB

Release files / pdfslides2ppt-1.2.0.tar.gz

Download URL pdfslides2ppt-1.2.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a16f62747626873a662024b89a032a1d14bbb97db5146b88338148b38b721066
BLAKE2b-256 checksum
How to use checksums
83ccf6b0d60de2a9bc98ff2333c409f9e2817333e19e0446c53c2d136952400b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Release files / pdfslides2ppt-1.2.0-py3-none-any.whl

Download URL pdfslides2ppt-1.2.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1acc99f8395cded5d37f1aeee9461dfa51136a0cc6d6fc5666be1ef538d8d780
BLAKE2b-256 checksum
How to use checksums
31e827e6b8c0bddb2adb7cd910d200aced8ce39ec4949233b230b1cebeb2e302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Security for pdfslides2ppt 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page