Giter VIP home page Giter VIP logo

e-certificates-generator's Introduction

e-certificates-generator

A simple PDF e-certificates generator made with PHP where people can generate and download their e-certificates.

Installation and configuration

The installation is super easy. You just need to checkout all files to your webserver directory.

PDF template

Replace dummy 'certificate.pdf' with the PDF file of your certificate design. Make sure that the design does not have name of the participant, which will be written while generating the e-certificate.

PDF file orientation and dimension

Configure the dimension of PDF file in points; width and height in 'template.php' file.

$pdf->addPage('L', [792, 612]);

Set font family and font size

Configure the font family and the font size.

$pdf->AddFont('Roboto-Regular');
$pdf->SetFont('Roboto-Regular', '', 48);

The following fonts are already included in the package: Courier, Droid Serif, Helvetica, Roboto Bold, Roboto Regular, Symbol, Times Roman, Zapfdingbats. More fonts can be added as per this tutorial.

Set font color

Configure the font color in RGB.

$pdf->SetTextColor(97, 101, 107);

Name position

Move the pointer to the correct position where we need to write the name. // Move to 500 points from the top

$pdf->ln(500);

Name alignment

Change the text alignment (6th parameter) as per your requirement. Check the mannual for more info.

$pdf->Cell(0, 0, $name, 0, 1, 'C');

Array of names for verification

To make sure that only people who have attended the event can receive the e-certificate, we will have an array of names (in lowercase letters) which will be used verify the name of the participant while generating the e-certificate.

In 'data.php' add all the names in lowercase letters to the constant array NAMES.

Home page

The home page can be customized as per your need by changing HTML (index.php) and CSS (custom.css).

Thank you

I have used the awesome FPDF with FPDI for this application.

e-certificates-generator's People

Contributors

debiprasad avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.