How to Start Convert PDF Read PDF Build PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

C# PDF Reader SDK
C# PDF Reader: How to read, extract font resource from PDF file


C# Demo Code to read, extract font resource from PDF file













Extract embedded font information from the PDF file


String inputFilePath = Program.RootPath + "\\" + "1.pdf";

//  Open file
PDFDocument doc = new PDFDocument(inputFilePath);
//  Retreive all embedded font information
List<PDFEmbedFontInfo> fontInfos = PDFTextHandler.GetEmbeddedFontInfo(doc);
//  Number of embedded fonts in the document.
Console.WriteLine("Embedded Font Count: {0}", fontInfos.Count);
foreach (PDFEmbedFontInfo fontInfo in fontInfos)
{
    //  Font name of the embedded font.
    Console.WriteLine("Font Name:      {0}", fontInfo.FontName);
    //  Object number in the PDF file.
    Console.WriteLine("Object Number:  {0}", fontInfo.ObjectNumber);
}