blob: 774e6164acb7385fcca011b8a3059a83750c36c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# kj-slidepacker
> to be used with exports from [sent-web](https://sent-web.site), LaTeX Beamer, or any other source of PDF presentations.
converts a `.pdf` presentation into a "fake" `.pptx` by rendering each page as an image and pasting it onto a blank slide.
output slides are **not editable**, this is intentional.
the goal is just to get a pdf into pptx format for corporate compliance purposes (e.g. sending to someone who **needs** a .pptx and would crazy if it's not sent with an extension that says • P P T X).
## deps
- python 3.13+ (probably works on older versions but not tested)
- [pymupdf](https://pypi.org/project/pymupdf/)
- [python-pptx](https://pypi.org/project/python-pptx/)
## install
```sh
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
## usage
```sh
# output defaults to the same stem as the input
./src/slidepacker deck.pdf
# specify output path
./src/slidepacker deck.pdf out.pptx
# set render resolution (default: 150 dpi)
./src/slidepacker deck.pdf --dpi 200
```
## as a libr
```python
import sys
sys.path.insert(0, "path/to/kj-slidepacker/src")
import slidepacker
slidepacker.pack("deck.pdf", "deck.pptx", dpi=200)
```
## license
0BSD - see [LICENSE](LICENSE)
|