hadi
Active Member
Hello
Please make following changes in generating pdf invoices if possible to support Arabic and Persian.
1) please add this new added font which google has added recently named : vazirmatn
2) follow below code we have recently used for ourself and solved our problems but better use above font named VazirMatn ;
Thanks
function generatePDF()
{
@ini_set("memory_limit", "128M");
$config = [
'mode' => 'utf-8', // '+aCJK', saleh
'autoScriptToLang' => true,
'autoLangToFont' => true,
'autoArabic' => true, //saleh
'setAutoTopMargin' => 'pad',
'setAutoBottomMargin' => 'pad',
'tempDir' => _DIR_ . '/../../../uploads/cache/',
'fontdata' => [ // saleh
'iranyekan' => [
'R' => 'iranyekanwebregularfanum.ttf',
'B' => 'iranyekanwebboldfanum.ttf',
'useOTL' => 0xFF,
'useKashida' => 75,
]
],
'default_font' => 'iranyekan' //saleh
];
Please make following changes in generating pdf invoices if possible to support Arabic and Persian.
1) please add this new added font which google has added recently named : vazirmatn
2) follow below code we have recently used for ourself and solved our problems but better use above font named VazirMatn ;
Thanks
function generatePDF()
{
@ini_set("memory_limit", "128M");
$config = [
'mode' => 'utf-8', // '+aCJK', saleh
'autoScriptToLang' => true,
'autoLangToFont' => true,
'autoArabic' => true, //saleh
'setAutoTopMargin' => 'pad',
'setAutoBottomMargin' => 'pad',
'tempDir' => _DIR_ . '/../../../uploads/cache/',
'fontdata' => [ // saleh
'iranyekan' => [
'R' => 'iranyekanwebregularfanum.ttf',
'B' => 'iranyekanwebboldfanum.ttf',
'useOTL' => 0xFF,
'useKashida' => 75,
]
],
'default_font' => 'iranyekan' //saleh
];