Forum


Replies: 3   Views: 245
Missing fonts using libreoffice as conversion plugin
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 miso  · 04-12-2024 - 11:15

Here is my code, simple and basic:

$filein = 'test.docx';
$fileout = 'test.pdf';

$docx = new CreateDocx();
$docx->transformDocument($filein , $fileout);


and with that the output PDF I get looks like this:

https://img001.prntscr.com/file/img001/iSURmMlLRhW65pCBoT5ZLg.jpeg

I don't understand what am I missing here.

The fonts in DOCX are Times New Roman, standard. Libreoffice is installed just fine on the server with all the fonts that come with it and then some. I even have msfonts installed in /usr/share/fonts/msttcore/, but somehow, when I run fc -list from the specific account I'm using this on, I only get this list of fonts available:

https://img001.prntscr.com/file/img001/Gac_rCM8TyaNin5uxiShug.jpeg

and when I run that fc -list as a root, I get 5 times as many more fonts showing.

Does that have anything to do with it?

How do we solve this issue?