Page 1 of 1

PDF with PHP creation. Encoding problem

Posted: Sun Jun 06, 2004 3:45 pm
by basdog22
I am using php 4.3.6 and i am trying to create a pdf file with it's builtin functions. It works fine but when i want to make a file with greek chars like:
Γειά σας τι κάνετε;
I get gliberish :roll:

I know it has something to do with findfont() but i tried a lot of things with no result. I searched but came up with nothing helpful.

Any ideas??

Posted: Mon Jun 07, 2004 5:48 am
by basdog22
I also tried cp1253 as the encoding. Tried pdf_set_font() and builtin as encoding as the pdflib manual describes but still nothing :roll:

Posted: Mon Jun 07, 2004 5:59 am
by patrikG
I have relied on ezPDF to do pretty much everything for me regarding PDF and it works beautifully. The API is quite straightforward.
I am, however, not sure how Greek characters are supported - I suppose you'd need to create the font-file (have a look at the readme file for ezPDF.
Also, there's a helpful discussion forum at http://sourceforge.net/forum/?group_id=45168

Posted: Mon Jun 07, 2004 6:06 am
by basdog22
yes i read about font file creating but...
aren't font files in the pdf related dir of PHP ???

How can i embed the fonts i created so that the pdf uses them and not the default ones???

Posted: Mon Jun 07, 2004 6:22 am
by patrikG
basdog22 wrote:yes i read about font file creating but...
aren't font files in the pdf related dir of PHP ???

How can i embed the fonts i created so that the pdf uses them and not the default ones???
Yes, you can - this tutorial should help you there. You will need to encode the fonts yourself, though. I remember looking into it a while ago and found an open-source app that did exactly that, but I can't find the link atm :(