Poppler.FontInfo¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Class Details¶
- class Poppler.FontInfo(**kwargs)¶
 - Bases:
 - Abstract:
 No
Interface for getting the Fonts of a poppler_document
Since 24.10 this type supports g_autoptr
- classmethod new(document)¶
 - Parameters:
 document (
Poppler.Document) – aPoppler.Document- Returns:
 a new
Poppler.FontInfoinstance- Return type:
 
Creates a new
Poppler.FontInfoobject
- free()¶
 
- scan(n_pages)¶
 - Parameters:
 n_pages (
int) – number of pages to scan- Returns:
 True, if fonts were found- iter:
 return location for a
Poppler.FontsIter
- Return type:
 (
bool, iter:Poppler.FontsIter)
Scans the document associated with self for fonts. At most n_pages will be scanned starting from the current iterator. iter will point to the first font scanned.
Here is a simple example of code to scan fonts in a document
<informalexample><programlisting> font_info =
Poppler.FontInfo.new(document); scanned_pages = 0; while (scanned_pages <=Poppler.Document.get_n_pages(document)) {Poppler.FontInfo.scan(font_info, 20, &fonts_iter); scanned_pages += 20; if (!fonts_iter) continue; /<!– –>* No fonts found in these 20 pages *<!– –>/ do { /<!– –>* Do something with font iter *<!– –>/ g_print (“Font Name: %s\n”,Poppler.FontsIter.get_name(fonts_iter)); } while (Poppler.FontsIter.next(fonts_iter));Poppler.FontsIter.free(fonts_iter); } </programlisting></informalexample>