I'm using Magento v2.1.3 with two languages. The default language is English and the other one is Arabic. Everything is working properly in frontend for the Arabic Language. In the backend, I'm trying to print the invoice in the Arabic language with direction Right to left. But I'm not getting the way to change the Direction for PDF invoice to RTL. Can you please help me to change the direction for the Arabic language?

Thanks in advance...!

  • Have you got any solution for this? – soofz May 28 '19 at 7:34
  • @Yudi got any solution regarding this concern? – Sanjay Vadadoriya Jan 27 at 6:47
  • Hey @sanjayVadadoriya, I'm using Tcpdf to export pdf for the invoice. You can use the below code if you are using same. $lg = Array(); $lg['a_meta_charset'] = 'UTF-8'; $lg['a_meta_dir'] = 'rtl'; $lg['a_meta_language'] = 'fa'; $lg['w_page'] = 'page'; $pdf->setLanguageArray($lg); $pdf->SetFont('aealarabiya', '', 11); $pdf->setRTL(true); $pdf->AddPage(); $pdf->writeHTML($html, true, false, true, false, ''); $pdf->lastPage(); $pdf->Output("$filename.pdf", 'I'); – Yudi Jan 27 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.