Forum


Replies: 1   Views: 3487
Pdf conversion utf8
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by skocznymroczny  · 14-09-2012 - 14:14

hi,

I am trying to export a PDF file with Polish characters like łóźżńś etc. this is my code:

[code]
public function generatePdf($html, $nazwapliku)
{
require_once '/phpdocx/classes/TransformDoc.inc';

$docx = new CreateDocx();
$docx->enableCompatibilityMode();
$docx->embedHTML($html, array('isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => true));
$docx->createDocx($nazwapliku);

$docxx = new TransformDoc();
$docxx->setStrFile($nazwapliku . '.docx');
$docxx->generatePDF();
exit;
}
[/code]

the HTML file is saved in Notepad++ using UTF-8 option, HTML file has <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> header.

Created .docx has good Polish letters, but .pdf exported from that .docx is broken.