Please note that, above is the size of array i.e. ByteArrayOutputStream baos where font file is saved, not the size of font itself. However, would you please confirm if you want to retrieve font size from existing PDF document. We will check the details at our side and provide our feedback accordingly. In case you want file size in MB or KB units, you can convert byte size as baos.size()/(1024*1024) and baos.size()/1024, respectively.
I tried this code and it threw an error "āAspose.Pdf.Documentā does not contain an definition for āFontUtilitiesā. Iām using Aspose.PDF .Net. Any help is appreciated.
The Aspose.Pdf.Document contains FontUtilities property in newer versions of the API. Would you kindly make sure to use latest version of the API and in case you still face any issue, please let us know.
Do you want to retrieve the size of the font stream/file embedded into an existing file? OR do you want to determine the text size? Please share a bit more details so that we can provide related information.