We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Providing fonts at run-time to Cells, Slides and Words (Java)

We have a Java service that runs in Ubuntu with a minimum set of installed fonts (the fontconfig package) that converts DOCX, PPTX and XLSX to PDF.

Whenever we want to perform a conversion we first open the document (provided by a byte[]) to determine what fonts are present and then obtain those fonts from an internal server. The first document object is closed and the document opened a second time using a LoadOptions object that has been set with the necessary MemoryFontSource(s).

This works fine (albeit with the overhead of opening the file twice) and allows parallel translations of both Slides and Words with a consistent set of fonts. Cells on the other hand does not allow parallel translations due to its use of the static FontConfigs object and the notes/observations made by your own staff in this forum article.

I have two questions:

  1. Is there a way to open a Presentation only once and yet still provide that object the necessary MemoryFontSource(s) it needs for use when saving to PDF? I’ve discovered that Words (Document) will allow me to set the fonts afterward (before save) by using this method.
  2. Is there any facility within Cells to at least mirror the functionality provided by Slides and Words such that it will allow parallel translations? Currently we use a lock to prevent concurrent Cells translations from interfering with the common font sources.


Thanks for contacting support.

We are working on gathering required information related to all APIs and will keep you updated.