I'm currently on a php project in which the pdf files can be able download generated from (html content) server side backend. I've already tested html2pdf librairy and I've found it is not a right choice for me because it doesn't support utf-8 format. When I tried with utf8_decode(), described in their documentation, the problem is just the same, showing a series of unknown characters. The language used is "Myanmar".
So I really would like to know if there's another good php based libraries for converting to pdf format.
Thanks in advance
Mee Mee
Try TCPDF.
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples
Main Features:
* no external libraries are required for the basic functions;
* supports all ISO page formats;
* supports custom page formats, margins and units of measure;
* supports UTF-8 Unicode and Right-To-Left languages;
* supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
* supports document encryption;
* includes methods to publish some (x)HTML code;
Try: "wkhtmltopdf" it just work great (and its -open source-). It uses webkit engine (used by safari, chrome browsers) and it is very easy to use. It also supports UTF-8:
wkhtmltopdf stackoverflow.com/questions/1164140/ output.pdf
Try it! for Linux and Windows as well. Easy to install. If you use ubuntu, type:
aptitude install wkhtmltopdf
I guess you need to have some fonts to support "Myanmar", as It was not able to display the language in my browser (with UTF-8).