How to Convert WebP to PDF with Python? Any Efficient Solutions?

20 Replies, 812 Views

Hey! I’ve been using `pdf2image` for the reverse process (pdf to images), but it also works great for webp to pdf with python.

Here’s a quick example:
```python
from pdf2image import convert_from_path

images = convert_from_path("input.webp")
images[0].save("output.pdf", "PDF")
```

It’s not the most efficient for large batches, but it gets the job done.



Users browsing this thread: 1 Guest(s)