Is it possible in Aspose APIs to get list of fonts used during conversion?

Hi,

I’d like to be able to determine which fonts (either names or filenames in the font path) are accessed when converting a document. I don’t see any support in the APIs, but I just wanted to post the question here in case I’m missing something.

I’d be interested in getting either a list of the font names, or the filenames of the fonts used.

Thanks,
Tom

Hi Tom,


Thank you for contacting support. Please list down the names of Aspose APIs to get more specific information. You can get or set the names of used fonts. Please refer to these help topics: Dealing with Font Settings using Aspose.Cells, Managing Fonts using Aspose.Slides and How to Receive Notification of Missing Fonts and Font Substitution during Rendering

Thanks, not quite what I wanted, but I’m curious: is there an underlying font manager in your libraries that might have the list of fonts actually used up to that point in time?


Alternatively, does it sound feasible to scan the document class and somehow find all the fonts referenced by a document?

Thanks,
Tom

Hi Tom,


Thanks for sharing the details.

Adding more to Imran’s comments, we have separate API for specific file format. and as shared earlier, each API has its own approach / technique to parse the input file and get information regarding fonts used in it. Please refer to the links shared above and when dealing with PDF documents, you may consider following instructions specified over Search and Get Text Segments from Pages of PDF

The page explains the steps to search / get text from complete PDF document and then get the information related to font for each TextSegment. Please notice following code line

[Java]
TextSegment.getTextState().getFont().getFontName()