Search code examples
phpcsspdfmpdfshopware

Shopware Arabic Invoice Text Not Connected


Im Using Shopware to create an arabic online shop and the problem is when shopware is creating the pdf, letters look not connected for example :

ر ق م ا ل ف ا ت و ر ة

while it should be

رقم الفاتورة

What i have tried so far is using different websafe fonts in the shopware backed body css under PdfCreation, i found that fonts changes but letters are still not connected.

while surfing shopware i found that it uses MPDF library to convert a file called index.tpl (Markup) to pdf , i tried a pointing to a google font and using it for body but it didn't load the font

Sample Pdf Generated by Shopware (Under PdfCreation Preview )


Solution

  • Okay after some searching I found that this is a problem with mPdf library as Shopware was using mPdf 6.0 which had a problem , so i downloaded mPdf 7.0 with composer Github , uploaded to FTP overriding the old mpdf library under engine/Library/Mpdf/ and it worked!

    I hope this helps someone!