This Python script generates certificates for a list of names provided in the Data.xlsx
Excel file. Each certificate includes the participant's name, a unique certificate ID, and the title "Certificate of Participation". The generated certificates are saved as PDF files in the certificates
directory.
Before running the script, ensure you have the following installed:
- Python 3.x
- Pillow library (PIL) for image processing: Install using
pip install Pillow
- Pandas library for reading data from Excel: Install using
pip install pandas
-
Prepare your data:
- Create an Excel file named
Data.xlsx
with a column namedname
containing the names of the participants.
- Create an Excel file named
-
Prepare your certificate template:
- Ensure your certificate template is in a supported image format (e.g., PNG, JPEG).
- Name the template image file
cert.png
and place it in the same directory as the script.
-
Prepare your font files:
- Choose TrueType font (TTF) files for text and titles on the certificates.
- Name the text font file
BRUSHSCI.TTF
and the title font filekepler_std_bold_semicondensed_subhead.otf
. - Place the font files in a
fonts
directory in the same location as the script.
-
Run the script:
- Open a terminal or command prompt and navigate to the directory containing the script.
- Run the script by executing
python script_name.py
(replacescript_name.py
with the actual name of your Python script).
-
Generated Certificates:
- The generated certificates will be saved as PDF files in the
certificates
directory.
- The generated certificates will be saved as PDF files in the
- Ensure the font size and location settings in the script (
font_size
,location
) are appropriate for your certificate template. - Verify the color settings (
text_color
) for proper visibility against the certificate background. - Each certificate includes a unique certificate ID.
- Test the script with a small set of names first to ensure the certificates are generated as expected.