Type 3 fonts PDF file

How to identify Type 3 fonts PDF files using Aspose.pdf? Please help me to identify Type 3 fonts PDF file.

@bganesan

Thanks for contacting support.

You may determine the font name, which is assigned to the text in the PDF, by using following code snippet. By checking the font name (if Type 3 Font), you may identify whether the PDF document is Type 3 or not.

//open document
Document pdfDocument = new Document(@"D:\Input.pdf");

//create TextAbsorber object to find all instances of the input search phrase
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("Summary");

//accept the absorber for a single page
pdfDocument.Pages[1].Accept(textFragmentAbsorber);

//get the extracted text fragments
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

string font = "";

foreach (TextFragment textFragment in textFragmentCollection)
{
    if (!textFragment.TextState.Font.IsEmbedded)
        font = textFragment.TextState.Font.FontName;
} 

In case if you face any issue, please share your source PDF document with us. We will test the scenario in our environment and address it accordingly.

Thanks for the updates !!! its works for me.

@bganesan

Thanks for your feedback.

It is good to know that suggested approach worked for you. Please keep using our API and in case you need any further assistance, please feel free to contact us.