Pdf2ppt
Convert PDF Slides to PowerPoint Presentations (PPT)
Install / Use
/learn @Teddy-van-Jerry/Pdf2pptREADME
pdf2ppt
Convert PDF Slides to PowerPoint Presentations (PPT)
Motivation
- LaTeX users can easily convert the
beamerslides in PDF to PPT. - Typst users can easily convert the
touyingslides in PDF to PPT.
Features
- [x] vector graph (highest resolution) in generated PPT
- [x] metadata (including title, author) conversion
- [x] auto-detection of slide size and aspect ratio
Dependency
- Python >= 3.9: This project heavily relies on
python-pptx. (Other required packages:pypdf,tqdm. Checkrequirements.txt) - pdf2svg: used for converting PDF to SVG
- Inkscape: used for converting SVG to EMF
Technical Implementation
- The first step is to create SVG from PDF via
pdf2svg. - Due to the limitation of
python-pptx, we need to convert SVG to EMF viainkscape. - Insert EMF into PPT via
python-pptx.
[!NOTE]
python3,pdf2svgandinkscapeshould be in your PATH. Alternatively,--pdf2svg-pathand--inkscape-pathoptions 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
pdf2pptto your PATH, you need to use./pdf2pptin 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-2024 Teddy van Jerry (Wuqiong Zhao). This project is distributed under the MIT License.
