Greek letters are replaced with ??? once I convert a docx into pdf using PHPWord?

Dimitrios Desyllas - Nov 17 '20 - - Dev Community

I made the following simple laravel artisan command:

Artisan::command('test:pdf',function(){
    \PhpOffice\PhpWord\Settings::setPdfRendererName(\PhpOffice\PhpWord\Settings::PDF_RENDERER_DOMPDF);
    \PhpOffice\PhpWord\Settings::setPdfRendererPath('.');

    $tmpFile = storage_path().'/contracts/test.docx';
    $outfile = storage_path().'/contracts/test.pdf';

    $phpWord = \PhpOffice\PhpWord\IOFactory::load($tmpFile);
    $phpWord->save($outfile,'PDF');

});

It receives a docx file and converts it into pdf. But for an ackward reason the docx contains greek letters and once rendered in pdf are converted into…

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player