News:

Support the VirtueMart project and become a member

Main Menu

TCPDF error: Could not include font definition file

Started by Agaton, June 29, 2012, 08:43:40 AM

Previous topic - Next topic

Agaton

Hi,

I have already found a few posts regarding error messages but as usual when it is a challenging issue very few responses on forum (not a moan a reality).

Anyway problem at hand....

TCPDF error: Could not include font definition file

occurs when I click create invoice in the orders section, what would be causing this.

I am using version 2.5.6 Joomla and 2.0.6 VM on a linux server running PHP 5.3.8.

Is this a:


  • Server Config Issue
  • VM config issue
  • Bug in VM
  • Or because I am using a test aresa

This is very important functionality and it would be nice to get an answer.

Agaton

Bump ------ Does anybody know what this error message means... I have recently upgraded to version 2.0.8e of vm.....

bytelord

Hello,

I think that you haven't write access to folder "fonts" from your web server. The fonts folder has to be writable because addTTFfont converts TTF file and writes the output of the conversion inside the fonts directory.


Hope it helps you out.

Regards.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Agaton

Unfortunately that isn't the answer, I run my own dedicated servers and have other domains on the same server, the settings are spot on exactly the same. There seems to be another issue and it appears to be a conflict with sobipro, but I am yet to fully test that theory.

Vut that you for your contribution.

ivus

Hi spike1968,

OK so if you're sure it's not a folder permissions folder, have you checked your server log files?

Have you changed the code? Are you trying to use more than 1 font in your PDF generation? as this is not possible.

Perhaps we can start there...  ;D

Agaton

Yeah I know its not that, I have done an identical install without SOBIPro in the same hosting environment, using the same files with permissions default. I inserted the data from the other install and it all worked perfectly. No 500 errors or TCPDF errors. Don't know what's causing it but I have tried to overwrite the files and that didn't fix it so there must be something extra in the site or a broken bit that won't fix.

Time to delete and reinstall... what a pain.

captcb40

I had the same problems here and I never could find any answer somewhere.

I solved this problem by reinstalling the com_virtuemart.2.0.8e_ext_aio file that you can download here: http://virtuemart.net/component/ars/repository/virtuemart-2-aio/virtuemart-2-aio-2-0-8e/com_virtuemart.2.0.8e_ext_aio.tar.gz

I really don't have any idea how it all of a sudden my invoices didn't work anymore and from here I never got an answer, so this is my best solution for my headaches..

Hopefully that will help you too

Agaton

Thanks for the suggestion, i tried that but in my case this wasn't the fix.

bytelord

Hello spike1968,

Does the file been produced or is still empty?
Do you use any special characters or UTF-8 format or slovak characters?
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Agaton

Quote from: bytelord on August 16, 2012, 09:57:04 AM
Does the file been produced or is still empty?
Do you use any special characters or UTF-8 format or slovak characters?
It's empty and there are no special characters in use and it's english.

What I am troubling to work out is why it is happening to this site only, i run dedicated servers and I have others sites on the same server with the same settings that work perfectly. I have done a complete rebuild of the server environment and the issue remains.

I will work it out eventually

bytelord

If you have other sites and works fine with same settings then is not a PHP or server issue.
I am thinking permissions again but you have already check that. Is there any way some of your plugin overrides tcpdf from producing the files? Have you installed any Joomla security components/plugins to protect the site and may conflict with tcpdf?
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ivus

Hi all,

I found recently that some font files may be corrupt and they are unable to correctly execute the function addTTFfont()... Are you using custom fonts? if not perhaps captcb40 comment will be useful.

I am using TCPDF on another non-VM related site and had issues with corrupt OTF fonts. Using TTF files fixed it. Also if you're using custom fonts, be sure to rename the file to all lowercase, letters and numbers ONLY.

I hope this helps.  ;D

bytelord

Hi,

You could use the tools of tcpdf to recompile some utf8 fonts like freesans, in case that may be are corrupted as ivus mention.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Agaton

Hi All,

I have tried all that, i have even tried a fresh install. I have identified that the issue seems to be with the folder for the invoices, but not quite what yet.....


bytelord

#14
It could be safe path as you told. Can you try from product details page (after you enable the pdf function from the be)  if the products prints on the PDF?
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!