Poppler CPP 24.12.0
Public Member Functions | List of all members
poppler::font_iterator Class Reference

#include "poppler/cpp/poppler-font.h"

Inheritance diagram for poppler::font_iterator:
Inheritance graph
[legend]

Public Member Functions

 ~font_iterator ()
 
int current_page () const
 
bool has_next () const
 
std::vector< font_infonext ()
 

Detailed Description

Reads the fonts in the PDF document page by page.

font_iterator is the way to collect the list of the fonts used in a PDF document, reading them incrementally page by page.

A typical usage of this might look like:

poppler::font_iterator *it = doc->create_font_iterator();
while (it->has_next()) {
std::vector<poppler::font_info> fonts = it->next();
// do domething with the fonts
}
// after we are done with the iterator, it must be deleted
delete it;
Reads the fonts in the PDF document page by page.
Definition poppler-font.h:76
std::vector< font_info > next()
Definition poppler-font.cpp:154
bool has_next() const
Definition poppler-font.cpp:179

Constructor & Destructor Documentation

◆ ~font_iterator()

font_iterator::~font_iterator ( )

Destructor.

Member Function Documentation

◆ current_page()

int font_iterator::current_page ( ) const
Returns
the current page

◆ has_next()

bool font_iterator::has_next ( ) const
Returns
whether the iterator has more pages to advance to

◆ next()

std::vector< font_info > font_iterator::next ( )
Returns
the fonts of the current page and advances to the next one.