I’m trying to convert excel file to pdf file.
I’m using GroupDocs.Conversion java library v24.8, on Ubuntu 22.04.4 LTS 64-bit.
I keep getting an error: com.groupdocs.conversion.internal.c.a.pd.exceptions.FontNotFoundException: Font Arial was not found
I’m not sure if this is acceptable solution for us, cause we don’t have full control over servers where our web app would be deployed.
Is this some known issue for GroupDocs.Conversion on Ubuntu?
Is there a way to bundle fonts into the GroupDocs.Conversion java library, or to make a new dependency that’d be pulled by GroupDocs.Conversion?
ConverterSettings converterSettings = new ConverterSettings();
converterSettings.setFontDirectories(List.of("/usr/share/fonts", "/usr/share/fonts/truetype", "/usr/share/fonts/truetype/dejavu"));
Converter converter = new Converter(inputPath, converterSettings)
and I’m still getting the same error: Font Arial was not found
Even if I try substitution: FontRepository.getSubstitutions().add(new SimpleFontSubstitution("Arial", "Lato"));
the substitution itself does not throw an error, but the conversion later throws still the same error: Font Arial was not found
Also, how is it possible that GroupDocs.Viewer can convert DOC to PDF successfully, but GroupDocs.Conversion, a library that’s actually intended for conversion, fails to do the same?