TCPDF ERROR: Could not include font definition file: courier

Phoca PDF - creating PDF documents in Joomla! CMS
sgofferj
Phoca Member
Phoca Member
Posts: 34
Joined: 13 May 2012, 16:46

TCPDF ERROR: Could not include font definition file: courier

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, no this is not possible - only one font can be used in PDF (PDF is not like HTML :-( )

Jan
If you find Phoca extensions useful, please support the project
sgofferj
Phoca Member
Phoca Member
Posts: 34
Joined: 13 May 2012, 16:46

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

Post 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 :).
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Post Reply