views:

268

answers:

1
require_once 'Zend/Pdf.php';
$pdf = new Zend_Pdf();
$page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
$pdf->pages[] = $page;
$page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 10);
$page->drawText("Bogus Russian: это фигня", 100, 400, "UTF-8");
$pdfData = $pdf->render();
header("Content-Disposition: inline; filename=output.pdf"); 
header("Content-type: application/x-pdf"); 
echo $pdfData;

I can't get the Russian characters to show up! I've managed to get them to show up as:

Russian: ???????????
Russian: ÐоммÑнÐ
Russian: 
and
Russian: ><
A: 

Perhaps this will answer your question:

http://stackoverflow.com/questions/173503/how-to-generate-pdf-files-with-utf-8-multibyte-characters-using-zend-framework

By the looks of it the default fonts do not have all the utf-8 characters...you may have to load external TTF...