Topic: TCPDF error: Could not include font definition file: dejavu.php

After upgrade from 2.0.1 to 2.1.2 I get this error:

TCPDF error: Could not include font definition file: dejavu.php

I'm currently unable to print any report, every one gives this error.

Re: TCPDF error: Could not include font definition file: dejavu.php

The Frontaccounting distribution seems to be missing specific font definitions for TCPDF. In the class.pdp.inc file there are references for fonts dejavu and freesans but they are not included in the fontdir. I installed a language file with UTF-8 locale and this means that Frontaccounting wants to use the dejavu-font.

I donwloaded the TCPDF-distribution and installed the specific fonts from it into the fontdir under frontaccounting. NOTE: I have changed 'dejavu' into 'dejavusans' in class.pdf.inc to make it work as there is no dejavu font in the TCPDF-distribution, only dejavusans and some others.

Please consider correcting this for the current and/or next distribution.

Re: TCPDF error: Could not include font definition file: dejavu.php

Of course changing dejavu into helvetica in class.pdf.inc wil also make things work as the helvetica definition is available in the fontdir.

I still have to test with all reporting options to see if the dejavusans font is to my liking, otherwise I might switch it to helvetica or another one perhaps.

Re: TCPDF error: Could not include font definition file: dejavu.php

In the Download Fonts section here on this Website, you can download the desired fonts. We only deliver the Adobe Built In font helvetica (iso-8859-1).

/Joe

Re: TCPDF error: Could not include font definition file: dejavu.php

Thanks for the info. But still the fact remains that the class.pdf.inc references certain font definitions that are not available in the distribution. If you add a language definition with UTF-8 as locale this creates an error so this should be addressed one way or another:

- keep the current class.pdf.inc and include the fonts that are referenced there into the distribution... or

- don't distribute the font definitions and change class.pdf.inc so it uses the bundled helvetica in each setting

Both are easy to do tmo.

Re: TCPDF error: Could not include font definition file: dejavu.php

I downloaded the dejavu fonts, but now the report that shows the monthly income statements every month for the current year does not show up (fourth down the list), unless I use utf8 encoding for es_AR and not utf-8 as it should. Please advise.

Re: TCPDF error: Could not include font definition file: dejavu.php

Hello,
Are you sure you need to run this as UTF-8? The footprints are quite large for PDF files when using UTF-8.
On our linux demo server,  , we changed the encoding in Setup tab, Install/Update Languages., from UTF-8 to iso-8859-1, and everything went fine using this encoding. Also this is recommended. Try for yourself on the demo server. Use 'Preferences' to shift to es_AR language. Remember to set it back again. I am not sure if all understand Spanish smile . Of course they should.

/Joe

Re: TCPDF error: Could not include font definition file: dejavu.php

I noticed it works perfectly on your server, but if I do that on mine, it reverts back to English and ignores the Spanish translation. I'm using Ubuntu 8.04 LTS 64 bit set to use es_HN.utf-8. All other reports work Ok except the one "Annual Expense Breakdown". If it is a matter of timing out, how can I increase the time so that FA won't report it as an error? It shows a triangle after a few seconds. Thank you for your help.

Re: TCPDF error: Could not include font definition file: dejavu.php

First please set pdf_debug to 1 in config.php temporarily. In this mode you will download generated pdf code instead of pdf report, but you should have displayed eventual error messages. Turn debugging off after the test. This should help in tracking the problem
Janusz

Re: TCPDF error: Could not include font definition file: dejavu.php

i get  error TCPDF error: Could not include font definition file: freesans.php

Re: TCPDF error: Could not include font definition file: dejavu.php

Please look into the previous posts here.

Non built in fonts have to be downloaded from our font section, downloads.

Read about it there.

Joe