Page 1 of 1

PDF Certificate

Posted: Thu Sep 24, 2015 2:38 pm
by santhosh
The template creation editor does not allow the style tag to be embedded. How can we apply external styles, fonts for the pdf certificate?

Re: PDF Certificate

Posted: Thu Sep 24, 2015 4:21 pm
by max
Hi Santhosh

welcome to the community.

The certificate uses Tiny Mce Editor, the same editor used across all the LMS. There's a lot of styles, formats, fonts and font sizes that you can directly select from it.
However, the system "sanitizes" the html from potencially malicious code. Maybe this is the issue you stumbled upon, since it's not clear to me what type of styles you could not use in your html code.

A potential workaround is using the .jpg background as much as you can, even for the "fixed" text.

Re: PDF Certificate

Posted: Fri Sep 25, 2015 8:05 am
by santhosh
I am using external CSS file and the fonts are used from"". Also, I have added inline styles in the text editor where I have some of the attributes like padding, position etc to place the text in exact position on the certificate with the required styles. The pdf does not generate with the required style. Does external CSS not work with TCPDF?

Re: PDF Certificate

Posted: Fri Sep 25, 2015 6:17 pm
by alberto
Dynamically generating a pdf from web content is triky, unfortunately it's not just like printing what you "would" see in a browser.
We integrated the standard version of TCPDF and it comes with many fonts, but if you need more check the TCPDF documentation here:
I wouldn't use much css for certificate design, prefer html formatting instead, it's more reliable.