Skip to content

Commit

Permalink
extend poppler-dump to show more info of text_box
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsuzuki committed Jan 3, 2018
1 parent bd824ab commit c215c42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cpp/tests/poppler-dump.cpp
Expand Up @@ -337,12 +337,13 @@ static void print_page_text_list(poppler::page *p)

std::cout << "---" << std::endl;
for (size_t i = 0; i < text_list.size(); i ++) {
poppler::rectf bbox = text_list[i]->bbox();
poppler::ustring ustr = text_list[i]->text();
std::string font_name = text_list[i]->get_font_name(0);
poppler::text_box* tb = text_list[i];
poppler::rectf bbox = tb->bbox();
poppler::ustring ustr = tb->text();
std::string font_name = tb->get_font_name(0);
std::cout << "[" << ustr << "] @ ";
std::cout << "( x=" << bbox.x() << " y=" << bbox.y() << " w=" << bbox.width() << " h=" << bbox.height() << " )";
std::cout << "( fontname=" << font_name << " )";
std::cout << "( fontname=" << font_name << " fontsize=" << tb->get_font_size() << " wmode=" << tb->get_wmode() << " )";
std::cout << std::endl;

delete text_list[i];
Expand Down

0 comments on commit c215c42

Please sign in to comment.