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 » Thu Sep 24, 2015 2:38 pm

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: 1783
Joined: Thu Mar 01, 2012 10:41 am

Re: PDF Certificate

Post by max » Thu Sep 24, 2015 4:21 pm

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
http://www.elearnit.net
http://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
http://elearnit.wordpress.com
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 » Fri Sep 25, 2015 8:05 am

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: 858
Joined: Fri Mar 02, 2012 9:18 am
Contact:

Re: PDF Certificate

Post by alberto » Fri Sep 25, 2015 6:17 pm

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.
--------------------------------------------------
Become a CONTRIBUTOR

Support the project for FREE!
www.Elearnit.net

Post Reply