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

Free Support Forum - aspose.com

How can I know which font is embedded in the PDF?

How can I know which font is embedded in the PDF?

@Junyoung

You may please use following code snippet to check whether fonts are embedded or not:

string dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments();

// Load an existing PDF files
Document doc = new Document(dataDir + "input.pdf");

// Iterate through all the pages
foreach (Page page in doc.Pages)
{
    if (page.Resources.Fonts != null)
    {
        foreach (Aspose.Pdf.Text.Font pageFont in page.Resources.Fonts)
        {
            if (pageFont.IsEmbedded)
                Console.WriteLine("Embedded " + pageFont.FontName);
        }
    }

    // Check for the Form objects
    foreach (XForm form in page.Resources.Forms)
    {
        if (form.Resources.Fonts != null)
        {
            foreach (Aspose.Pdf.Text.Font formFont in form.Resources.Fonts)
            {
                if (formFont.IsEmbedded)
                    Console.WriteLine("Embedded " + formFont.FontName);
            }
        }
    }
}