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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.