Poppler CPP 26.06.90
poppler-page-renderer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010, Pino Toscano <pino@kde.org>
3 * Copyright (C) 2018, Zsombor Hollay-Horvath <hollay.horvath@gmail.com>
4 * Copyright (C) 2026, Trevor L Davis <trevor.l.davis@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef POPPLER_PAGE_RENDERER_H
22#define POPPLER_PAGE_RENDERER_H
23
24#include "poppler-global.h"
25#include "poppler-image.h"
26
27namespace poppler {
28
29using argb = unsigned int;
30
31class page;
32class page_renderer_private;
33
34class POPPLER_CPP_EXPORT page_renderer : public poppler::noncopyable
35{
36public:
38 {
39 antialiasing = 0x00000001,
40 text_antialiasing = 0x00000002,
41 text_hinting = 0x00000004,
42 ignore_paper_color = 0x00000008
43 };
44
45 enum line_mode_enum
46 {
47 line_default,
48 line_solid,
49 line_shape
50 };
51
52 page_renderer();
53 ~page_renderer();
54
55 argb paper_color() const;
56 void set_paper_color(argb c);
57
58 unsigned int render_hints() const;
59 void set_render_hint(render_hint hint, bool on = true);
60 void set_render_hints(unsigned int hints);
61
62 image::format_enum image_format() const;
63 void set_image_format(image::format_enum format);
64
65 line_mode_enum line_mode() const;
66 void set_line_mode(line_mode_enum mode);
67
68 image render_page(const page *p, double xres = 72.0, double yres = 72.0, int x = -1, int y = -1, int w = -1, int h = -1, rotation_enum rotate = rotate_0) const;
69
70 static bool can_render();
71
72private:
73 page_renderer_private *d;
74 friend class page_renderer_private;
75};
76
77}
78
79#endif
render_hint
A flag of an option taken into account when rendering.
Definition poppler-page-renderer.h:38
@ ignore_paper_color
Definition poppler-page-renderer.h:42
page_renderer()
Constructs a new page renderer.
Definition poppler-page-renderer.cpp:117
A page in a PDF document.
Definition poppler-page.h:143
Single namespace containing all the classes and functions of poppler-cpp.
Definition poppler-destination.h:27