Hey! For webp to pdf with python, I’d recommend using `Pillow` (PIL) + `fpdf`.
First, open the webp with PIL, then use fpdf to add it to a PDF. Here’s a quick snippet:
```python
from PIL import Image
from fpdf import FPDF
img = Image.open('image.webp')
img.save('temp.png') # Save as PNG first
pdf = FPDF()
pdf.add_page()
pdf.image('temp.png', 10, 10, 100)
pdf.output("output.pdf")
```
Not the *cleanest*, but it works!
First, open the webp with PIL, then use fpdf to add it to a PDF. Here’s a quick snippet:
```python
from PIL import Image
from fpdf import FPDF
img = Image.open('image.webp')
img.save('temp.png') # Save as PNG first
pdf = FPDF()
pdf.add_page()
pdf.image('temp.png', 10, 10, 100)
pdf.output("output.pdf")
```
Not the *cleanest*, but it works!
