Making of Certificate


There are many ways to make a cerficate. But I used LaTeX for this.

Here multiple certificates are produced from single file.

Requirements:

  • Install LaTeX using command: sudo apt-get install texlive-full
  • Need datatool.sty file or install this package for importing csv file.
  • Need data.csv file which contain information retrieved from database.

Here is the exmaple of data.csv:

Name,Dep,photo
Mrs. Satwinder Kaur,Applied Science,img/SatwinderKaur.JPG
Er. Nirmal Singh,Electronics  \& Comm. Engineering,img/NirmaljitSingh.JPG
Er. Kulwinder Singh Mann,Information Technology,img/KulwinderSinghMann.JPG
Er. Gurdeep Singh Hyher,Computer Applications,img/GurdeepSingh.JPG
Er. Arvind Dhingra,Electrical Engineering,img/ArvindDhingra.JPG

In the above, img is the folder which contain photos of people

  • Need logo of an organisation or institute, background image and photo of the persons.

logo.png

background.png

  • Maximum and minimum size of photos is 1000*1000 pixels and 2100*2800 pixels respectively.
  • certificate.tex which is main file and it includes following code the code.
Here is code for certificate.tex:
 \documentclass[16pt,a4paper]{scrartcl}                            %class
\usepackage[landscape,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} %for layout
\usepackage{setspace} % for spacing between lines
\usepackage{graphicx}         %for including images
\usepackage{eso-pic}     %package for including background image
%---------------------------------------------------------------
 \newcommand\BackgroundPic{
 \put(0,0){
 \parbox[b][\paperheight]{\paperwidth}{%
 \vfill
 \centering
 \includegraphics[width=\paperwidth,height=\paperheight,
 keepaspectratio]{background.jpg}              % here include background image
 \vfill
 }}}
%----------------------------------------------------------------
%=============================
\usepackage{datatool}  % This package is required to include database file as .csv 
\DTLloaddb{names}{data.csv}       % data.csv includes information from database
 %=============================
%=============================
 \begin{document}
 \AddToShipoutPicture{\BackgroundPic}     % here background image is called
%=============================
 \DTLforeach{names}{
 \name=Name, \dep=Dep, \photo=photo}{
 %=============================
 \noindent
\begin{minipage}[l]{1.5in}
\includegraphics[width=.92\linewidth]{logo.png}  %Here include left side image
\end{minipage}
 \hfill
 %=============================
 \begin{minipage}[c]{6.5in}
\end{minipage}
 \hfill
 %=============================
\begin{minipage}[r]{1.0in}
\includegraphics[width=1.2\linewidth]{\photo}  %here include right side image
\end{minipage}
%=============================
\vspace{6cm}
\doublespacing
\noindent{{It is certified that {{\large{\name}}} of Department of {{\large{\dep}}}
of Guru Nanak Dev Engineering College, Ludhiana attended  two day workshop on 
``Learning Content Management System" organised by Department of Civil Engineering
and Department of Computer Science \& Engineering.}}
%=============================
 \pagebreak
 }
\end{document}

After this,  just compile certificate.tex file using command:

             $pdflatex certificate.tex

This will produce certificate.pdf which have multiple certificates.

If you want to convert pdf to jpg images, Here is the method:

  1. First install imagemagic tool using command: sudo apt-get install imagemagick
  2. Create the folder named jpg
  3. Run the following command to convert pdf file to jpg images:
        $convert -density 300 certificate.pdf jpg/certificates.jpg

This command convert the pdf file to multiple jpg images in the folder jpg.

Here is the example of certificate.jpg:

Now certificates are ready for printing 🙂

3 thoughts on “Making of Certificate

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s