Poppler.FontInfo

g GObject.Object GObject.Object Poppler.FontInfo Poppler.FontInfo GObject.Object->Poppler.FontInfo

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (document)

free ()

scan (n_pages)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Poppler.FontInfo(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod new(document)
Parameters:

document (Poppler.Document) – a Poppler.Document

Returns:

a new Poppler.FontInfo instance

Return type:

Poppler.FontInfo

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>