Forum


Replies: 3   Views: 193
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 admin  · 04-12-2024 - 16:44

Hello,

Although LibreOffice can read embedded fonts, it also reads fonts available in the fs.

There's some read access issue in the fonts installed in your OS. It seems LibreOffice can't read/access them. Please check the information available on the following pages:

https://ask.libreoffice.org/t/how-to-add-ttf-font-files-to-libreoffice-on-linux/13079/9

https://askubuntu.com/questions/32088/some-fonts-dont-appear-in-libreoffice

Maybe you need to copy the fonts to ~/.local/share/fonts or ~./fonts, and refresh the font cache by running:

sudo fc-cache -f -v

fc-cache -f -v

to clean the global font cache, the root font cache, and the user font cache.

Please check if the user that runs LibreOffice has access to the fonts folder, and if the font list displayed with:

fc -list

are available in the same folder or distinct folders. Maybe the fonts displayed when running this command as root use different folders than the ones available by LibreOffice.

Also please test the conversion using PHP CLI mode (instead of a web server):

$ sample.php

with root and a regular user, and check if the PDF displays the contents correctly.

As requested in our previous reply, please send the DOCX document and PDF output to contact[at]phpdocx.com.

Regards.