learn05 / arabiclang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arabiclang for domPDF

this is solution for the dompdf Laravel Plugin

I found a solution for the dompdf to solve the Arabic text in PDF Generator, this is for Laravel. also every PHP developer can get an adantage and easy to use to this library to add arabic text to different kind of PHP PDF genrators.

هذه المكتبة والطريقة التالية تقدم حل لاظهار اللغة العربية لأضافة domPDF لارافيل, والطريقة كالتالي:

  1. Create a Folder inside App Called Library.
  2. Upload the "I18N" to the Library Folder.
  3. Open the text.php file, that is located in:
    \vendor\dompdf\dompdf\src\Renderer
  4. find the below almost in #90 line.
    $this->_canvas->text($x, $y, $text, $font, $size, $style->color, $word_spacing, $char_spacing);
  5. Add the Below Code Above it:
    if (strtolower($style->direction) == 'rtl') { $Arabic = new \App\Libraries\I18N\I18N_Arabic('Glyphs'); $text = $Arabic->utf8Glyphs($text); }

Original Code at this link Click Me

this Code is Credited to "khaled.alshamaa" for the ar-php library and "Dominique Abou Samah"for the answer in StackOverFlow, many Thanks to them

URL of the Original Answer is Click Here

About


Languages

Language:HTML 79.5%Language:PHP 20.4%Language:CSS 0.1%