Certificate for Student that completed course

Hi

I have just done a nice custom doc that works well ( just data entry so no JS/Pythjon required ) and I feel I am starting to understand this. But now I want to do something in the Education module and I am unsure. If someone can just provide some guidance if my thinking is in the
correct direction.

ERPNext: v12.28.0 (version-12)
Frappe Framework: v12.25.0 (version-12

The Education module has a “Assessment Result” that one can view the result-sheet
for a student. And you can print this result sheet but I would like to take this a step further
and print a nice looking certificate… “This is to certify that … attended the Course…”

My thinking is as follows …
To create a button on the “Assessment Result” sheet …“Generate Certificate” which one can
click and it will fetch the Course name, student name from the data in the “Assesment Result”
doc.

As a start, I created a new doctype and added an 'HTML editor" to the doc and inserted some
HTML code that yields a certificate… just to test my idea. But the print is a mess.
The doctype heading and doc-name is still on the print with the certificate content printed
halfway off the page.

Am I on the rigth track ?