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

Free Support Forum - aspose.com

Safely Use Single MemoryFontSource Instance for processing Multiple Documents in Multi Threaded Application C# .NET


Our product makes use of Aspose.Words for .NET to process MS Word documents on a web server. As the server may not contain all True Type fonts we may face in a document, we’re going to use MemoryFontSource to add some additional fonts to the Document class instance. My question is - is it safe to use the same instance of MemoryFontSource for multiple documents, taking into account that those documents will be processed in parallel by multiple threads? I assume, that Document only reads from MemoryFontSource and doesn’t modify it, so our scenario should be thread-safe, but would like to make sure.
Thanks a lot in advance.


We are checking this scenario and will get back to you soon.

Good, thank you!


Yes, we can confirm that the MemoryFontSource class object is thread safe. The font data byte array is used for reading purpose only. In case you have further inquiries or may need any help in future, please let us know.

Thanks again for your help!