tags:

views:

232

answers:

5

hey guys i searched a lot but there is a little topics discussed about generating pdf file in php ( using utf-8 format ) . my target language is Persian ( Arabic format ) and im wondering what is the best way to generate a clear cut and working pdf files out of my mysql/php scripts .

when im trying to use FPDF no satisfying result comes out , the pdf generated with this script looks terrible and unreadable .

Persian is a mufti byte language exactly like Arabic ( actually with more alphabetic words )

A: 

Have you tried TCPDF?

echo
hey guys while ago source forge banned Iran from downloading scripts . i dont know what's wrong with these people , are they limiting people or government . Can u upload latest version on rapidshare or somewhere else ?
farshad Ghazanfari
hmm . i made it . its working nicely . maybe this time im better at coding . thanx everyone
farshad Ghazanfari
A: 

I would suggest that you look at itextsharp which is a is a port of the iText open source java library. A great library for pdf generation.

Can be dowloaded from sourceforge.net.

Regards and happy coding

Muleskinner
A: 

There are a number of things you can do

  1. If you have firefox running on your server, you can install a plugin which will create a PDF via the commandline.

  2. You can install the php library called html2ps and then covert ps2pdf. So basically you create a web page which will look exactly like the pdf file you want to create and run html2ps on it. Almost all css tags are supported.

The second option has worked well for most of our projects.

Sudhanshu
A: 

For example the Zend Framework supports to create PDFs -> http://framework.zend.com/manual/en/zend.pdf.html

You can also use FOP Processing to generate PDF. For that you have to call Apache FOP with exec() or shell_exec().

DrDol
+1  A: 

thanks everyone tried to help me , just answering this question to end this topic

i found the solution by using this block of code ,

by using this script u can happily export ur datas to utf-8 ( Persian ) PDF files

http://www.tecnick.com/pagefiles/tcpdf/example_018.phps

farshad Ghazanfari