how do I generate certificate like that on udemy

I recently got into a project where I need to generate a certificate after performing well on an online quiz when he crosses 75%.

I got the certificate template ready but I need to attach his name which is dynamic and display it to him as an image.
For example, it should be like the one you see on Udemy after completing your course.

I use angularjs and PHP for my project

I have tried to use fpdf for generating the same certificate in a pdf which is just a PHP but cannot figure out how with the inclusion of angularjs.

Source: AngularJS