Using TCPDF (latest 6.0.004) as PDF generator.
Maybe it's not module bug, pdf's are generating normally.
Error shows up on admin/config page.
TCPDF ERROR: Could not include font definition file: helvetica
Function AddFont() (tcpdf.php line 4195) produces an error message:
Variable $fontfile contains wrong path to font file, because of empty return value _getfontpath().
include/tcpdf_fonts.php line 1669:
public static function _getfontpath() {
if (!defined('K_PATH_FONTS') AND is_dir(dirname(__FILE__).'/fonts')) {
define('K_PATH_FONTS', dirname(__FILE__).'/fonts/');
}
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
}
dirname(__FILE__) is 'include' (include/tcpdf_fonts.php), but path 'include/fonts' is not existing.
K_PATH_FONTS can't be defined, so function returns ''. Wrong fonts directory.
I've copied fonts directory to includes, it's working now. I can't find a reason why tcpdf invoked on administration page.
Comments
Comment #1
jcnventuraI think this was a bug in 6.0.004, that got fixed in 6.0.005.
http://sourceforge.net/p/tcpdf/code/ci/57fd821ca9d21421216c09aef45c20a58...
Comment #2
Rhodungeon commentedI have the same error with tcpdf (version 6.0.0.96 installed).
Comment #3
Rhodungeon commentedThat's a strange issue: the 6.0.0.98 version has the same problem, however the warning disappears if I run the local version of the website. The online version is on a VPS server with cloudfire activated...
Any idea? I've tried installing all the versions of the module.
Comment #4
esdu19 commentedRhodungeon do you fix the bug? I have the same problem... local version runs perfect but in the server fails...