Certificates generator

In case you need a certificate generator, here it is a very simple one:

The code (also in this github repo):

import pandas as pd
from PIL import Image, ImageDraw, ImageFont
import os

data = pd.read_excel (r'names.xlsx') 
name_list = data["Name"].tolist() 
for i in name_list:
    im = Image.open(r'template.png')
    d = ImageDraw.Draw(im)
    location = (100, 398)
    text_color = (0, 137, 209)
    font = ImageFont.truetype("arial.ttf", 70)
    d.text(location, i, fill = text_color, font = font)
    im.save("certificato_" + i + ".pdf")
    os.startfile("certificato_" + i + ".pdf")

An example of template. The names will be printed on it.

 


Subscribe to the newsletter for updates
Tkinter templates
My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts