Hi šš
In this post, I will share with you how to convert images to PDF files using Python.
step 1
You need to install Pillow liblary from here pip install Pillow
step 2
You need to some images to convert them to PDF file
step 3
Load all images and convert them.
from PIL import Image
from os import listdir
def images_to_pdf():
images = [Image.open(f'images/{i}') for i in listdir('images')]
images[0].save('out.pdf', save_all=True, append_images = images)
images_to_pdf()
Now we're done š¤
Don't forget to like and follow š
Support me on PayPal š¤
https://www.paypal.com/paypalme/amr396