Teddy-van-Jerry / pdf2ppt

Convert PDF Slides to PowerPoint Presentations (PPT)

Home Page:https://wqzhao.org/p/pdf2ppt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdf2ppt

Convert PDF Slides to PowerPoint Presentations (PPT)

Motivation

LaTeX users can easily convert the beamer slides in PDF to PPT.

Features

  • vector graph (highest resolution) in generated PPT
  • metadata (including title, author) conversion
  • auto-detection of slide size and aspect ratio

Dependency

Technical Implementation

  1. The first step is to create SVG from PDF via pdf2svg.
  2. Due to the limitation of python-pptx, we need to convert SVG to EMF via inkscape.
  3. Insert EMF into PPT via python-pptx.

Note

python3, pdf2svg and inkscape should be in your PATH. Alternatively, --pdf2svg-path and --inkscape-path options can be used to specify their paths.

Usage

Installation

Use git to clone the repository.

git clone https://github.com/Teddy-van-Jerry/pdf2ppt.git --depth=1

If you only want the latest Python script, you can directly download the source file.

wget https://raw.githubusercontent.com/Teddy-van-Jerry/pdf2ppt/master/pdf2ppt

For non-Windows users, use make install to install the script to /usr/local/bin (which should be in your PATH variable).

Tip

Make sure you have the dependency installed.

Command Line Options

You can use pdf2ppt -h to view all options.

Quick Start

Note

If you have not installed pdf2ppt to your PATH, you need to use ./pdf2ppt in the correct directory.

Specifying the output file name.

pdf2ppt input.pdf output.pptx

Without specifying output file name. The output will be input.pptx under the same directory of input.

pdf2ppt input.pdf

Toggle verbose mode.

pdf2ppt input.pdf output.pptx --verbose

Known Issues

Transparent Background

Unfortunately, elements with transparency are not supported by the project, due to limitations of the dependency. You will receive a warning when such issues are detected, and you can copy the generated SVG manually to fix the problem. View #1 for more details.

License

Copyright ©️ 2023 Teddy van Jerry (Wuqiong Zhao). This project is distributed under the MIT License.

About

Convert PDF Slides to PowerPoint Presentations (PPT)

https://wqzhao.org/p/pdf2ppt

License:MIT License


Languages

Language:Python 86.2%Language:TeX 9.7%Language:Makefile 3.8%Language:Shell 0.4%