Page 1 of 1

TCPDF ERROR: Could not include font definition file: courier

Posted: 14 Jun 2012, 11:05
by sgofferj
Hi,

I get the above error when trying to create a PDF from an article which contains pre areas. However, the CSS does just define font-family: monospace; not Courier.

Is there any way to fix this or is it impossible to have different font families in one pdf?

-Stefan

Re: TCPDF ERROR: Could not include font definition file: cou

Posted: 15 Jun 2012, 17:45
by Jan
Hi, no this is not possible - only one font can be used in PDF (PDF is not like HTML :-( )

Jan

Re: TCPDF ERROR: Could not include font definition file: cou

Posted: 15 Jun 2012, 19:17
by sgofferj
Is this a limitation of the library? Because generally, PDF supports referencing as well as embedding fonts - you can test it with OpenOffice / LibreOffice :).

Re: TCPDF ERROR: Could not include font definition file: cou

Posted: 17 Jun 2012, 18:00
by Jan
Hi, no it is not the limiation of the library, e.g. in Phoca PDF you can set one font for header, second font for content and third font for footer. But displaying more fonts in content, this is not so easy as the font needs to be loaded to the document, needs to be parsed the info about load it, then it will take more time to render, etc. etc. So this needs to be customized in the code, not default feature :-(

Jan