Make an Automatic Certificate Generator in Python — 10 Lines Code | Automation [How to?]

Hello World !!
How are You all?
I hope You all are great & safe.

Today, We will see how we can generate the bulk certificate within seconds and with only 10 lines of the code of python.

Let’s Start

Step 1 -
First You need to install Python
Click here to Install
*Make Sure to include path while installation

Step 2 -
Then After Installation, Just install some libraries using the following commands in the command prompt.

pip install PI
pip install pandas
pip install pillow

Step 3 — ( 10 Lines Code )

from PIL import Image, ImageDraw, ImageFont
import pandas as pd
import os
df = pd.read_csv('list.csv')
font = ImageFont.truetype('arial.ttf',60)
for index,j in df.iterrows():
img = Image.open('certificate.jpg')
draw = ImageDraw.Draw(img)
draw.text(xy=(725,760),text='{}'.format(j['name']),fill=(0,0,0),font=font)
img.save('pictures/{}.jpg'.format(j['name']))

Step 4 — (Other Requirements)

Certificate Jpg/Png File
List of Names which will appear on certificate

Step 5 — (Important)
Make a pictures folder where the code file is saved to save the generated certificates

If you want to watch the Full Tutorial then This Youtube video will help you which is made by Me

Watch Full Tutorial on Youtube

Watch Full Tutorial

Github Code Link — Click here

You can also fork this repo to your’s account.

bhargav-joshi / Certificates-Generator

Certificates Generator in Python Simple & only in 10 Lines | Simple Trick to decrease the time limit

> Follow Me on Social media for Such Posts :)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store