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
- classmethod new(document)¶
- Parameters:
document (
Poppler.Document
) – aPoppler.Document
- Returns:
a new
Poppler.FontInfo
instance- Return type:
Creates a new
Poppler.FontInfo
object
- free()¶
- scan(n_pages)¶
- Parameters:
n_pages (
int
) – number of pages to scan- Returns:
True
, if there are more fonts left to scan- 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); while (Poppler.FontInfo.scan
(font_info, 20, &fonts_iter)) { 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>