TexLive Package is used to run the .tex files
sudo apt-get install Texlive
#incase you face any errors on missing packages
sudo apt-get install texlive-latex-extra
Install Mac-Tex
Download either of
- TexLive
- MicTex
- Lyx (Advice: mictex and lyx may take a long while to install.)
you can also run the tex file online on the website Overleaf
pip install -f requirements.txt
Files Required
- Background Template - ./cert.pdf
- CTE Logo - ./CTE_logo.png
- CSV - ./FinalRecords.csv
- Signature - ./sign.pdf
pdflatex --output-directory=../otherdir /path/to/myfile.tex
Follow instructions on MacTex website
MicTex and Lyx are both GUI programs with elements to convert .tex to .pdf
Compile and Download PDF
python splitter.py
-
First run the preprocess.py script with a Records.csv file in the same directory which outputs a FinalRecords.csv file.
-
When running latex file make sure to have the CTE_logo.png, cert.pdf, sign.pdf and FinalRecords.csv in the same directory and make sure to run the TexLive command after you cd to the folder containing all these files
-
Finally run the splitter.py to split the pdf generated after step2 and go to the Certificates folder to find all certificates which are labelled as CertID_ID.pdf
-
For two signs exchange this minipage codeblock with the last minipage in certGen.tex (line 65)
\begin{minipage}[l]{8.8in}
{\hspace{-0.55cm}\includegraphics[width=.1\linewidth,]{sign.pdf} \hspace{10.41cm}\includegraphics[width=0.1\linewidth]{sign.pdf}}
{\hspace{-0.35cm}\shortstack{\vrule width 2in height 0.2pt\\\footnotesize} {\hspace{7.51cm}\shortstack{\vrule width 2in height 0.2pt\\\footnotesize}}
}
{\hspace{-0.55cm} \textbf {\scriptsize PROF. BHARAT M DESHAPANDE (HEAD, CTE)}\hspace{1.6cm} \textbf{\scriptsize SUHRUDH S (PRESIDENT,CTE)}\\ \vspace{0.3cm}{\hspace{-0.58cm} \color{lightgrey}{\small BITS PILANI KK BIRLA GOA CAMPUS}}}
% you can change the fontsize by using "tiny,footnotesize,small,medium,large"
\end{minipage}}
Note : To change the contents of the certificates ull need to change the text in the latex file. Also remember to change the date!