PDF Certificate

Anything about what happens on the user and teacher side
Post Reply
santhosh
Newbie
Posts: 2
Joined: Thu Sep 24, 2015 7:54 am
Version: forma.lms 1.4

PDF Certificate

Post 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?
User avatar
max
FormaLms Guru
Posts: 2735
Joined: Thu Mar 01, 2012 10:41 am
Version: forma.lms 2.4
Contact:

Re: PDF Certificate

Post 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.
---------------------
Massimiliano Ferrari
Elearnit - Elearning e Knowledge Management
https://www.elearnit.net
https://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
Skype: m_ferrari_it
santhosh
Newbie
Posts: 2
Joined: Thu Sep 24, 2015 7:54 am
Version: forma.lms 1.4

Re: PDF Certificate

Post by santhosh »

I am using external CSS file and the fonts are used from"https://fonts.googleapis.com". 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?
User avatar
alberto
FormaLms Guru
Posts: 1134
Joined: Fri Mar 02, 2012 9:18 am
Contact:

Re: PDF Certificate

Post 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: http://www.tcpdf.org/fonts.php
I wouldn't use much css for certificate design, prefer html formatting instead, it's more reliable.
Post Reply