Document conversion API with Custom Font Support in Java

Hello,
We use GroupDocs.Conversion for Java for converting the MS office docs to pdf. I would like to know how we can handle the custom font requests. I have following questions:

  1. Which fonts are supported by GroupDocs.Conversion for Java?
  2. If we want to provide custom font support, can we support those by installing the fonts on the application server or by using Java API?
1 Like

@prashantk14,

API supports by default only system fonts path (all the installed fonts in system). For example, all fonts are installed here C:\Windows\Fonts in Windows OS and all of them are supported by the API.

Yes, you can also add custom fonts path to the API. You have to install fonts on server and pass its path to the API. Please explore this open source example project.

Thanks for your response. To test the first part, I installed the font under C:\Windows\Fonts and then tried GroupDocs conversion for Java on a Word doc that uses the font. But it did not use the font and converted it to PDF with default font. I do see a log from GroupDocs, and not sure if it is related: INFO STREAM: UNKNOWN COLON INT_20 INT_20 INT_03 INT_20 INT_15 INT_48 INT_00 UTC.

Please let me know if I should try any other options. I wanted to send you the docx and ttf as attachments, but I can’t upload those in this editor.

@prashantk14,

Please share sample application (exclude licence file), problematic file(s) and fonts that you’re using. We’ll then investigate it at our end.
You can upload these files/application to some cloud storage (e.g. Google drive, Dropbox) and share link here.

We are able to use default fonts and custom fonts as well. Thanks for you help.

1 Like

@prashantk14,

You are welcome.

So, we have an inconsistent behavior. Certain custom fonts are supported in PPTx (whereas some custom fonts work fine), whereas same custom fonts work in DOCX when these files are converted to pdf using groupdocs.

The following URL provides all fonts, as working docx and non working pptx. Text may look similar with these fonts in docx and pptx, but there is difference in character ‘g’ as as example.
https://aoddev.robohead.com/map.do?id=7UJ4qJT01585686882

@prashantk14

Thanks for sharing the additional information. I have tested the scenario at our end using latest version of GroupDocs.Conversion for Java and I’m afraid I’m unable to notice the reported issue.
convertedDOCX.pdf (59.6 KB)
convertedPPTX.pdf (86.2 KB)

We will appreciate it if you please share your problematic PDF document here along with your environment details. It will help us to replicate the issue at our end and guide you accordingly.