RTL PhpWord на Setvalue loadTemplate Docx - PullRequest
0 голосов
/ 05 ноября 2018

я проблема с RTL на setvalue, когда моя строка персидская

например =>

$arabicText = 'سلام';
$phpWord = new PhpOffice\PhpWord\PhpWord();
$document = $phpWord->loadTemplate('../phpword/print_bank.docx');
$document->SetValue('bank',$arabicText);

$file = 'bank_print.docx';
header("Content-Description: File Transfer");
header('Content-Disposition: attachment; filename="' . $file . '"');
header("Content-Type: application/docx");
header('Content-Transfer-Encoding: 8bit');
header("Cache-Control: public");
header('Expires: 0');
$document->saveAs('php://output');

теперь экспортируем docx ==> مالس

...