Is there a way to get the list of embedded fonts in a PDF file using the PDFClown library? The aim is to check whether it is a scanned PDF of not, assuming it is a scanned document if it doesn't have embedded fonts.
Thanks in advance
Is there a way to get the list of embedded fonts in a PDF file using the PDFClown library? The aim is to check whether it is a scanned PDF of not, assuming it is a scanned document if it doesn't have embedded fonts.
Thanks in advance
UPDATE
I've just found out how to list embedded PDF fonts, even though it didn't help much with my problem. Here's a sample code.
string pdffile = @"path\to\your\PDF\document.pdf";
using (File pdf = new File(pdffile))
{
Document doc = pdf.Document;
foreach (Page page in doc.Pages)
{
foreach (var a in page.Resources.Fonts.Keys)
{
Console.WriteLine(page.Resources.Fonts[a].Name);
}
}
}