Poppler CPP 24.11.0
|
#include "poppler/cpp/poppler-page.h"
Public Types | |
enum | orientation_enum { landscape , portrait , seascape , upside_down } |
enum | search_direction_enum { search_from_top , search_next_result , search_previous_result } |
enum | text_layout_enum { physical_layout , raw_order_layout , non_raw_non_physical_layout } |
enum | text_list_option_enum { text_list_include_font = 1 } |
Public Member Functions | |
~page () | |
double | duration () const |
ustring | label () const |
orientation_enum | orientation () const |
rectf | page_rect (page_box_enum box=crop_box) const |
bool | search (const ustring &text, rectf &r, search_direction_enum direction, case_sensitivity_enum case_sensitivity, rotation_enum rotation=rotate_0) const |
ustring | text (const rectf &r, text_layout_enum layout_mode) const |
ustring | text (const rectf &r=rectf()) const |
std::vector< text_box > | text_list () const |
std::vector< text_box > | text_list (int opt_flag) const |
page_transition * | transition () const |
A page in a PDF document.
The possible orientation of a page.
The direction/action to follow when performing a text search.
page::~page | ( | ) |
Destructor.
double page::duration | ( | ) | const |
The eventual duration the page can be hinted to be shown in a presentation.
If this value is positive (usually different than -1) then a PDF viewer, when showing the page in a presentation, should show the page for at most for this number of seconds, and then switch to the next page (if any). Note this is purely a presentation attribute, it has no influence on the behaviour.
ustring page::label | ( | ) | const |
page::orientation_enum page::orientation | ( | ) | const |
rectf page::page_rect | ( | page_box_enum | box = crop_box | ) | const |
Returns the size of one rect of the page.
bool page::search | ( | const ustring & | text, |
rectf & | r, | ||
search_direction_enum | direction, | ||
case_sensitivity_enum | case_sensitivity, | ||
rotation_enum | rotation = rotate_0 |
||
) | const |
Search the page for some text.
text | the text to search | |
[in,out] | r | the area where to start search, which will be set to the area of the match (if any) |
direction | in which direction search for text | |
case_sensitivity | whether search in a case sensitive way | |
rotation | the rotation assumed for the page |
ustring page::text | ( | const rectf & | r, |
text_layout_enum | layout_mode | ||
) | const |
Returns the text in the page.
rect | if not empty, it will be extracted the text in it; otherwise, the text of the whole page |
layout_mode | the layout of the text |
Returns the text in the page, in its physical layout.
r | if not empty, it will be extracted the text in it; otherwise, the text of the whole page |
std::vector< text_box > page::text_list | ( | ) | const |
Returns a list of text of the page.
This method returns a std::vector of text_box that contain all the text of the page, with roughly one text word of text per text_box item.
For text written in western languages (left-to-right and up-to-down), the std::vector contains the text in the proper order.
std::vector< text_box > page::text_list | ( | int | opt_flag | ) | const |
Extended version of text_list() taking an option flag.
The option flag should be the multiple of text_list_option_enum.
page_transition * page::transition | ( | ) | const |
The transition from this page to the next one.
If it is set, then a PDF viewer in a presentation should perform the specified transition effect when switching from this page to the next one.