Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting html to pdf with Arabic

Tags:

php

pdf

I need to generate a pdf file with php from html, I ve use html2pdf but it doesn't support Arabic. I need something that's easy to use.

and thanks in advance

like image 449
Youssef Bouhjira Avatar asked Sep 28 '12 21:09

Youssef Bouhjira


People also ask

How do I convert HTML to PDF automatically?

On a Windows computer, open an HTML web page in Internet Explorer, Google Chrome, or Firefox. On a Mac, open an HTML web page in Firefox. Click the “Convert to PDF” button in the Adobe PDF toolbar to start the PDF conversion. Enter a file name and save your new PDF file in a desired location.


1 Answers

You could try with TCPDF, I've use it in the past and got the job done, one of its listed features is:

  • UTF-8 Unicode and Right-To-Left languages

So I suppose that covers Arabic.

UPDATE:
Yes they support it, even have an online example:

Persian and Arabic language on RTL document: PDF and its PHP source

like image 84
Nelson Avatar answered Sep 22 '22 00:09

Nelson