One of the feature in our application is to check if the fonts in a PDF file are embedded or not. While you have the function to get embed status, in some cases aspose is reporting the status incorrectly.
Please see attached file (font-Embedded.jpg), the fonts marked in RED color using descendent font and in one case AsposePDF.Net is retuning the right value for embedded status while in other case it returning a incorrect embed status.
We like to know how we can get the font embedded status in this particular case. I am using Aspose.PDf v17.4.0
I am using below code to get font embedded status:
//////////// Code Start
string FontEmbedded = "No";
Document pdfdoc = new Document(sPDFFilePath);
Aspose.Pdf.Page page = pdfdoc.Pages[1];
FontCollection fontcoll = page.Resources.Fonts;
foreach (Font font in fontcoll)
{
if (font.IsEmbedded)
{
FontEmbedded = "Yes";
}
}
//////////// Code End
Font-Embedded.jpg (66.8 KB)
Thanks
Chenna Basappa