Converting Image to Pdf using python

Gauri Guglani
2 min readMar 24, 2023

--

Hello Everyone, Hope everyone is doing great. I just tried one python program to convert images to pdf and thought to share it with you all. This will help everyone to learn something new or maybe add extra knowlede to your current learning repository.

Source~Google

Starting off, Step1- 1st we have to install python library known as Pillow

Step 2- Import Image from the PIL. In short PIL stands for Python Imaging Library, which is a library for working with images in Python. PIL provides a range of image processing capabilities, including image manipulation, filtering, and transformation.

Step 3- Take the file, open the image and store the image file that you need to convert. The “convert” function is used to convert the image to the RGB color space. The converted image is then appended to the “images” list.

Step 4- Save the converted file into the pdf location.

Yay you have just converted an image file into pdf.

--

--

Gauri Guglani

Data Science |Technology |Motivation | Reader | Writer | Foodie| Connect with me on linkedin:- https://www.linkedin.com/in/gauri-guglani-a87b731a6/