problems with zend_pdf and right to left language and unicode?

Posted by user1400 on Stack Overflow See other posts from Stack Overflow or by user1400
Published on 2010-04-04T11:31:55Z Indexed on 2010/04/04 11:43 UTC
Read the original article Hit count: 559

Filed under:
|
|

hi all,

i am using zend_pdf to create pdf files for Ritgh to left language as arabic or east asia langauges

i use of this code

$pdfDoc = new Zend_Pdf();
$pdfPage = $pdfDoc->newPage(Zend_Pdf_Page::SIZE_A4);

$font = Zend_Pdf_Font::fontWithPath(APPLICATION_PATH.'/Fonts/arial.ttf');
$pdfPage->setFont($font, 36);
$pdfDoc->pages[] = $pdfPage;
$unicodeString = '????';
$pdfPage->drawText($unicodeString, 72, 720, 'UTF-8');
$pdfDoc->save('utf8.pdf');

but there are two problem

1- how can i change document's direction to right to left ?

2- characters are separated one by one. but in some laguages characters of a word are joint together.

any idea? or i may use tcpdf?

thanks

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about zend-pdf