Generate certificates automatically using a template and an Excel list of names.
from PIL import Image, ImageDraw, ImageFont # For image processing
import pandas as pd # For reading Excel file
import os # For file/folder operations
template.png
- Certificate template imageparticipants.xlsx
- Excel file containing:- Column named "Name" with participant names
MonsieurLaDoulaise-Regular.ttf
- Font file for names
- Install required packages:
pip install Pillow pandas
- Place all files in your project folder:
your_folder/
├── certificate_generator.py
├── template.png
├── participants.xlsx
└── MonsieurLaDoulaise-Regular.ttf
- Run the script:
python certificate_generator.py
- Certificates will be generated in a new
certificates
folder - Each certificate will be saved as
firstname_certificate.png
- Change text position: modify
y_pos = 720
- Change font size: modify
font_size = 60
- Change output filename: modify filename in
output_path
- Make sure Excel file has a "Name" column
- Ensure all files are in the same folder
- Check if font file name matches exactly