Free Support Forum -

PPTX to PDF conversion font family issue using Java

I’m getting an error that states “FontFamily ‘DejaVu Sans Mono’ not found” when I try to convert the pptx file that is in the file using version “16.10.1” of the conversion jar. It works fine if I drop back down to “3.0.0” I’ve included the list of fonts I have installed in the “fc-list.txt” file, and the full stack trace I see.

Any help or direction would be greatly appreciated.


Nathan Mills

Hi Nathan,

Thanks for taking interest in GroupDocs.Conversion for Java 16.10.1 and posting your concerns.
Can you please share the sample code with us. We’ll appreciate your cooperation.

Kind regards

Here is some code that reproduces the problem, you will need to copy fonts into the fonts directory in order to make them available in the docker container.

It looks like it’s an environment issue, I have installed the deja vu fonts and that doesn’t solve it, but installing the entire ubuntu-desktop package seems to. I’d like to keep my docker image small, do you have any ideas about what other things I may be missing that would cause the “FontFamily ‘DejaVu Sans Mono’ not found” message?

Hi Nathanm,

We tried to reproduce same issue at our end using following code snippet:

public static String convertToPdfAsFilePath(String fileName) throws {
// Instantiating the conversion handler
ConversionHandler conversionHandler = new ConversionHandler(getConfiguration());
FileInputStream fis = new FileInputStream(fileName);
PdfSaveOptions saveOption = new PdfSaveOptions();
WatermarkOptions watermarkOptions = new WatermarkOptions(“Watermark text”);
watermarkOptions.setFont(new Font(“DejaVu Sans Mono”, 70, 70));
// return the path of the converted document
String convertedDocumentPath = conversionHandler. convert(fis, fileName, saveOption);
return convertedDocumentPath;

We didn’t face any exception while converting pptx document to pdf along-with watermark text in DejaVu Sans Mono font. Please find the output pdf document. Can you please share your code, specifically where you are applying font while conversion?

Best wishes

Hi Nathanm,

It looks like it’s an environment issue
Yes seems so. Because we are not able to reproduce same issue at our end.
but installing the entire ubuntu-desktop package seems to
So, installing the entire Ubuntu-desktop package resolved the issue ?

Kind regards