Class: Poppler::FontInfo
- Inherits:
-
Object
- Object
- Poppler::FontInfo
- Defined in:
- (unknown)
Overview
Interface for getting the Fonts of a poppler_document
Since 24.10 this type supports g_autoptr
Instance Method Summary collapse
- #free ⇒ nil
-
#initialize(document) ⇒ Poppler::FontInfo
constructor
Creates a new Poppler::FontInfo object.
-
#scan(n_pages, iter) ⇒ Boolean
Scans the document associated with font_info for fonts.
Constructor Details
#initialize(document) ⇒ Poppler::FontInfo
Creates a new Poppler::FontInfo object
Instance Method Details
#free ⇒ nil
#scan(n_pages, iter) ⇒ Boolean
Scans the document associated with font_info 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
font_info = poppler_font_info_new (document);
scanned_pages = 0;
while (scanned_pages <= poppler_document_get_n_pages(document)) {
poppler_font_info_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_fonts_iter_get_name (fonts_iter));
} while (poppler_fonts_iter_next (fonts_iter));
poppler_fonts_iter_free (fonts_iter);
}