1namespace Poppler {
2
3class Page {
4%TypeHeaderCode
5#include <qt5/poppler-qt5.h>
6%End
7
8public:
9    ~Page();
10    enum Rotation {
11        Rotate0 = 0,
12        Rotate90 = 1,
13        Rotate180 = 2,
14        Rotate270 = 3,
15    };
16    enum PageAction {
17        Opening,
18        Closing,
19    };
20    enum TextLayout {
21        PhysicalLayout,
22        RawOrderLayout,
23    };
24    enum PainterFlag {
25        DontSaveAndRestore = 0x00000001,
26    };
27    typedef QFlags<Poppler::Page::PainterFlag> PainterFlags;
28    QImage renderToImage(double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1, Rotation rotate = Rotate0) const /ReleaseGIL/;
29    bool renderToPainter(QPainter* painter, double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1,
30                         Rotation rotate = Rotate0, PainterFlags flags = 0) const /ReleaseGIL/;
31    QImage thumbnail() const;
32    QString text(const QRectF &rect, TextLayout textLayout) const;
33    QString text(const QRectF &rect) const;
34    enum SearchDirection {
35        FromTop,
36        NextResult,
37        PreviousResult,
38    };
39    enum SearchMode {
40        CaseSensitive,
41        CaseInsensitive,
42    };
43%If(POPPLER_V0_31_0 -)
44    enum SearchFlag {
45%If(POPPLER_V0_63_0 -)
46        NoSearchFlags = 0x00000000,
47%End
48        IgnoreCase = 0x00000001,
49        WholeWords = 0x00000002,
50%If(POPPLER_V0_74_0 -)
51        IgnoreDiacritics = 0x00000004,
52%End
53    };
54    typedef QFlags<Poppler::Page::SearchFlag> SearchFlags;
55%End
56    bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const /Deprecated, ReleaseGIL/;
57    bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchFlags flags = 0, Rotation rotate = Rotate0) const /ReleaseGIL/;
58%If(POPPLER_V0_22_0 -)
59    QList<QRectF> search(const QString &text, SearchMode caseSensitive, Rotation rotate = Rotate0) const /Deprecated, ReleaseGIL/;
60%End
61%If(POPPLER_V0_31_0 -)
62    QList<QRectF> search(const QString &text, SearchFlags flags = 0, Rotation rotate = Rotate0) const /ReleaseGIL/;
63%End
64    QList<Poppler::TextBox*> textList(Rotation rotate = Rotate0) const;
65    QSizeF pageSizeF() const;
66    QSize pageSize() const;
67    Poppler::PageTransition *transition() const;
68    Poppler::Link *action( PageAction act ) const;
69    enum Orientation {
70        Landscape,
71        Portrait,
72        Seascape,
73        UpsideDown,
74    };
75    Orientation orientation() const;
76    void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown);
77    QList<Poppler::Link*> links() const;
78    QList<Poppler::Annotation*> annotations() const /Factory/;
79%If(POPPLER_V0_28_0 -)
80    QList<Poppler::Annotation*> annotations(const QSet<Poppler::Annotation::SubType> &subtypes) const /Factory/;
81%End
82%If(POPPLER_V0_20_0 -)
83    void addAnnotation( const Annotation *ann );
84    void removeAnnotation( const Annotation *ann );
85%End
86    QList<Poppler::FormField*> formFields() const;
87    double duration() const;
88    QString label() const;
89
90private:
91    Page();
92    Page( const Poppler::Page & );
93
94}; // class Page
95
96}; // namespace Poppler
97