from PIL import Image

image1 = Image.open(r'path where the image is stored\file name.png')
im1 = image1.convert('RGB')
im1.save(r'path where the pdf will be stored\new file name.pdf')

9e5d6721b450d1b23a94fde9d563708afe1eb07d
<mask token>

<mask token>
im1.save('path where the pdf will be stored\\new file name.pdf')

<mask token>
image1 = Image.open('path where the image is stored\\file name.png')
im1 = image1.convert('RGB')
im1.save('path where the pdf will be stored\\new file name.pdf')

from PIL import Image
image1 = Image.open('path where the image is stored\\file name.png')
im1 = image1.convert('RGB')
im1.save('path where the pdf will be stored\\new file name.pdf')

from PIL import Image

image1 = Image.open(r'path where the image is stored\file name.png')
im1 = image1.convert('RGB')
im1.save(r'path where the pdf will be stored\new file name.pdf')
