Poppler Qt5 26.10.90
poppler-qt5.h
1/* poppler-qt.h: qt interface to poppler
2 * Copyright (C) 2005, Net Integration Technologies, Inc.
3 * Copyright (C) 2005, 2007, Brad Hards <bradh@frogmouth.net>
4 * Copyright (C) 2005-2015, 2017-2022, 2026, Albert Astals Cid <aacid@kde.org>
5 * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
6 * Copyright (C) 2006-2011, Pino Toscano <pino@kde.org>
7 * Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
8 * Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
9 * Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com>
10 * Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
11 * Copyright (C) 2011 Glad Deschrijver <glad.deschrijver@gmail.com>
12 * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
13 * Copyright (C) 2012, Fabio D'Urso <fabiodurso@hotmail.it>
14 * Copyright (C) 2012, Tobias Koenig <tobias.koenig@kdab.com>
15 * Copyright (C) 2012, 2014, 2015, 2018, 2019 Adam Reichold <adamreichold@myopera.com>
16 * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
17 * Copyright (C) 2013 Anthony Granger <grangeranthony@gmail.com>
18 * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
19 * Copyright (C) 2017, 2020, 2021 Oliver Sander <oliver.sander@tu-dresden.de>
20 * Copyright (C) 2017, 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
21 * Copyright (C) 2018, 2021 Nelson Benítez León <nbenitezl@gmail.com>
22 * Copyright (C) 2019 Jan Grulich <jgrulich@redhat.com>
23 * Copyright (C) 2019 Alexander Volkov <a.volkov@rusbitech.ru>
24 * Copyright (C) 2020 Philipp Knechtges <philipp-dev@knechtges.com>
25 * Copyright (C) 2020 Katarina Behrens <Katarina.Behrens@cib.de>
26 * Copyright (C) 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
27 * Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
28 * Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>.
29 * Copyright (C) 2021 Mahmoud Khalil <mahmoudkhalil11@gmail.com>
30 * Copyright (C) 2021 Georgiy Sgibnev <georgiy@sgibnev.com>. Work sponsored by lab50.net.
31 * Copyright (C) 2022 Martin <martinbts@gmx.net>
32 * Copyright (C) 2023 Kevin Ottens <kevin.ottens@enioka.com>. Work sponsored by De Bortoli Wines
33 * Copyright (C) 2024 Pratham Gandhi <ppg.1382@gmail.com>
34 * Copyright (C) 2025, g10 Code GmbH, Author: Sune Stolborg Vuorela <sune@vuorela.dk>
35 * Copyright (C) 2025 Stefan Brüns <stefan.bruens@rwth-aachen.de>
36 * Copyright (C) 2026 Sune Stolborg Vuorela <sune@vuorela.dk>, work sponsored by the Direction Interministérielle du Numérique
37 *
38 * This program is free software; you can redistribute it and/or modify
39 * it under the terms of the GNU General Public License as published by
40 * the Free Software Foundation; either version 2, or (at your option)
41 * any later version.
42 *
43 * This program is distributed in the hope that it will be useful,
44 * but WITHOUT ANY WARRANTY; without even the implied warranty of
45 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 * GNU General Public License for more details.
47 *
48 * You should have received a copy of the GNU General Public License
49 * along with this program; if not, write to the Free Software
50 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
51 */
52
53#ifndef __POPPLER_QT_H__
54#define __POPPLER_QT_H__
55
56#include <functional>
57
58#include "poppler-annotation.h"
59#include "poppler-link.h"
60#include "poppler-optcontent.h"
61#include "poppler-page-transition.h"
62
63#include <QtCore/QByteArray>
64#include <QtCore/QDateTime>
65#include <QtCore/QSet>
66#include <QtXml/QDomDocument>
67#include "poppler-export.h"
68
69class EmbFile;
70class Sound;
71class AnnotMovie;
72
76namespace Poppler {
77
78class Document;
79class DocumentData;
80
81class PageData;
82
83class FormField;
85
86class TextBoxData;
87
88class PDFConverter;
89class PSConverter;
90
91struct OutlineItemData;
92
102using PopplerDebugFunc = void (*)(const QString & /*message*/, const QVariant & /*closure*/);
103
115POPPLER_QT5_EXPORT void setDebugErrorFunction(PopplerDebugFunc debugFunction, const QVariant &closure);
116
129
136{
137 QVariant data;
138 ErrorStringType type;
139};
140
150class POPPLER_QT5_EXPORT TextBox
151{
152 friend class Page;
153
154public:
160 TextBox(const QString &text, const QRectF &bBox);
165
169 QString text() const;
170
177 QRectF boundingBox() const;
178
185
189 QRectF charBoundingBox(int i) const;
190
194 bool hasSpaceAfter() const;
195
196private:
197 Q_DISABLE_COPY(TextBox)
198
199 TextBoxData *m_data;
200};
201
202class FontInfoData;
207class POPPLER_QT5_EXPORT FontInfo
208{
209 friend class Document;
210
211public:
215 enum Type
216 {
217 unknown,
218 Type1,
219 Type1C,
220 Type1COT,
221 Type3,
222 TrueType,
223 TrueTypeOT,
224 CIDType0,
225 CIDType0C,
226 CIDType0COT,
227 CIDTrueType,
228 CIDTrueTypeOT
229 };
230
232
235 FontInfo();
236
240 explicit FontInfo(const FontInfoData &fid);
242
246 FontInfo(const FontInfo &fi);
247
252
256 QString name() const;
257
262 QString substituteName() const;
263
268 QString file() const;
269
275 bool isEmbedded() const;
276
283 bool isSubset() const;
284
292 Type type() const;
293
302 QString typeName() const;
303
308
309private:
310 FontInfoData *m_data;
311};
312
313class FontIteratorData;
333class POPPLER_QT5_EXPORT FontIterator
334{
335 friend class Document;
336 friend class DocumentData;
337
338public:
343
348 QList<FontInfo> next();
349
354 bool hasNext() const;
355
359 int currentPage() const;
360
361private:
362 Q_DISABLE_COPY(FontIterator)
363 FontIterator(int startPage, DocumentData *dd);
364
365 FontIteratorData *d;
366};
367
368class EmbeddedFileData;
372class POPPLER_QT5_EXPORT EmbeddedFile
373{
374 friend class DocumentData;
375 friend class AnnotationPrivate;
376
377public:
379 explicit EmbeddedFile(EmbFile *embfile);
381
386
390 QString name() const;
391
397 QString description() const;
398
404 int size() const;
405
409 QDateTime modDate() const;
410
414 QDateTime createDate() const;
415
421 QByteArray checksum() const;
422
428 QString mimeType() const;
429
433 QByteArray data();
434
440 bool isValid() const;
441
445 // QDataStream dataStream() const;
446
447private:
448 Q_DISABLE_COPY(EmbeddedFile)
449 explicit EmbeddedFile(EmbeddedFileData &dd);
450
451 EmbeddedFileData *m_embeddedFile;
452};
453
462class POPPLER_QT5_EXPORT Page
463{
464 friend class Document;
465
466public:
471
476 {
481 };
482
491
502
508 {
509 NoPainterFlags = 0x00000000,
518 };
519 Q_DECLARE_FLAGS(PainterFlags, PainterFlag)
520
521
559 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;
560
570 using RenderToImagePartialUpdateFunc = void (*)(const QImage & /*image*/, const QVariant & /*closure*/);
571
580 using ShouldRenderToImagePartialQueryFunc = bool (*)(const QVariant & /*closure*/);
581
631 QImage renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate, RenderToImagePartialUpdateFunc partialUpdateCallback, ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
632 const QVariant &payload) const;
633
641 using ShouldAbortQueryFunc = bool (*)(const QVariant & /*closure*/);
642
696 QImage renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate, RenderToImagePartialUpdateFunc partialUpdateCallback, ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
697 ShouldAbortQueryFunc shouldAbortRenderCallback, const QVariant &payload) const;
698
741 bool renderToPainter(QPainter *painter, double xres = 72.0, double yres = 72.0, int x = -1, int y = -1, int w = -1, int h = -1, Rotation rotate = Rotate0, PainterFlags flags = NoPainterFlags) const;
742
751 QImage thumbnail() const;
752
765 QString text(const QRectF &rect, TextLayout textLayout) const;
766
775 QString text(const QRectF &rect) const;
776
786
795
800 {
801 NoSearchFlags = 0x00000000,
802 IgnoreCase = 0x00000001,
803 WholeWords = 0x00000002,
804 IgnoreDiacritics = 0x00000004,
807 AcrossLines = 0x00000008
810 };
811 Q_DECLARE_FLAGS(SearchFlags, SearchFlag)
812
813
824 Q_DECL_DEPRECATED bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
825
838 bool search(const QString &text, double &sLeft, double &sTop, double &sRight, double &sBottom, SearchDirection direction, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
839
851 Q_DECL_DEPRECATED QList<QRectF> search(const QString &text, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
852
867 QList<QRectF> search(const QString &text, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
868
885 QList<TextBox *> textList(Rotation rotate = Rotate0) const;
886
911 QList<TextBox *> textList(Rotation rotate, ShouldAbortQueryFunc shouldAbortExtractionCallback, const QVariant &closure) const;
912
916 QSizeF pageSizeF() const;
917
921 QSize pageSize() const;
922
934
940 Link *action(PageAction act) const;
941
952
957
961 void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown);
962
966 QList<Link *> links() const;
967
976 QList<Annotation *> annotations() const;
977
990 QList<Annotation *> annotations(const QSet<Annotation::SubType> &subtypes) const;
991
999 void addAnnotation(const Annotation *ann);
1000
1008
1015 QList<FormField *> formFields() const;
1016
1024 double duration() const;
1025
1031 QString label() const;
1032
1038 int index() const;
1039
1040private:
1041 Q_DISABLE_COPY(Page)
1042
1043 Page(DocumentData *doc, int index);
1044 PageData *m_page;
1045};
1046
1054class POPPLER_QT5_EXPORT OutlineItem
1055{
1056 friend class Document;
1057
1058public:
1063 ~OutlineItem();
1064
1065 OutlineItem(const OutlineItem &other);
1066 OutlineItem &operator=(const OutlineItem &other);
1067
1068 OutlineItem(OutlineItem &&other) noexcept;
1069 OutlineItem &operator=(OutlineItem &&other) noexcept;
1070
1074 bool isNull() const;
1075
1079 QString name() const;
1080
1084 bool isOpen() const;
1085
1091 QSharedPointer<const LinkDestination> destination() const;
1092
1098 QString externalFileName() const;
1099
1105 QString uri() const;
1106
1112 bool hasChildren() const;
1113
1119 QVector<OutlineItem> children() const;
1120
1121private:
1122 explicit OutlineItem(OutlineItemData *data);
1123 OutlineItemData *m_data;
1124};
1125
1176class POPPLER_QT5_EXPORT Document
1177{
1178 friend class Page;
1179 friend class DocumentData;
1180
1181public:
1194
1208
1220
1227 {
1228 Antialiasing = 0x00000001,
1229 TextAntialiasing = 0x00000002,
1230 TextHinting = 0x00000004,
1231 TextSlightHinting = 0x00000008,
1232 OverprintPreview = 0x00000010,
1233 ThinLineSolid = 0x00000020,
1234 ThinLineShape = 0x00000040,
1235 IgnorePaperColor = 0x00000080,
1236 HideAnnotations = 0x00000100
1237 };
1238 Q_DECLARE_FLAGS(RenderHints, RenderHint)
1239
1240
1251
1264 void setColorDisplayProfile(void *outputProfileA);
1274 void setColorDisplayProfileName(const QString &name);
1285 void *colorRgbProfile() const;
1296 void *colorDisplayProfile() const;
1297
1315 static Document *load(const QString &filePath, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1316
1341 static Document *load(QIODevice *device, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1342
1364 static Document *loadFromData(const QByteArray &fileContents, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1365
1383 Page *page(int index) const;
1384
1397 Page *page(const QString &label) const;
1398
1402 int numPages() const;
1403
1410
1417
1424 Qt::LayoutDirection textDirection() const;
1425
1434 bool unlock(const QByteArray &ownerPassword, const QByteArray &userPassword);
1435
1439 bool isLocked() const;
1440
1456 QDateTime date(const QString &type) const;
1457
1463 bool setDate(const QString &key, const QDateTime &val);
1464
1468 QDateTime creationDate() const;
1469
1475 bool setCreationDate(const QDateTime &val);
1476
1480 QDateTime modificationDate() const;
1481
1487 bool setModificationDate(const QDateTime &val);
1488
1505 QString info(const QString &type) const;
1506
1512 bool setInfo(const QString &key, const QString &val);
1513
1517 QString title() const;
1518
1524 bool setTitle(const QString &val);
1525
1529 QString author() const;
1530
1536 bool setAuthor(const QString &val);
1537
1541 QString subject() const;
1542
1548 bool setSubject(const QString &val);
1549
1553 QString keywords() const;
1554
1560 bool setKeywords(const QString &val);
1561
1565 QString creator() const;
1566
1572 bool setCreator(const QString &val);
1573
1577 QString producer() const;
1578
1584 bool setProducer(const QString &val);
1585
1592
1596 QStringList infoKeys() const;
1597
1601 bool isEncrypted() const;
1602
1609 bool isLinearized() const;
1610
1615 bool okToPrint() const;
1616
1621 bool okToPrintHighRes() const;
1622
1630 bool okToChange() const;
1631
1636 bool okToCopy() const;
1637
1643 bool okToAddNotes() const;
1644
1652 bool okToFillForm() const;
1653
1660
1667
1675 bool okToAssemble() const;
1676
1691 Q_DECL_DEPRECATED void getPdfVersion(int *major, int *minor) const;
1692
1695 {
1696 int major;
1697 int minor;
1698 };
1699
1707
1719 QList<FontInfo> fonts() const;
1720
1736 FontIterator *newFontIterator(int startPage = 0) const;
1737
1743 QByteArray fontData(const FontInfo &fi) const;
1744
1751 QList<EmbeddedFile *> embeddedFiles() const;
1752
1756 bool hasEmbeddedFiles() const;
1757
1781 Q_DECL_DEPRECATED QDomDocument *toc() const;
1782
1790 QVector<OutlineItem> outline() const;
1791
1800 LinkDestination *linkDestination(const QString &name);
1801
1807 void setPaperColor(const QColor &color);
1813 QColor paperColor() const;
1814
1831
1837 static QSet<RenderBackend> availableRenderBackends();
1838
1848 void setRenderHint(RenderHint hint, bool on = true);
1854 RenderHints renderHints() const;
1855
1864
1873
1879 QString metadata() const;
1880
1894
1903
1910
1919 QStringList scripts() const;
1920
1937
1945
1958 bool getPdfId(QByteArray *permanentId, QByteArray *updateId) const;
1959
1966
1972 QVector<int> formCalculateOrder() const;
1973
1982 QVector<FormFieldSignature *> signatures() const;
1983
1990
1997 void setXRefReconstructedCallback(const std::function<void()> &callback);
1998
2003
2004private:
2005 Q_DISABLE_COPY(Document)
2006
2007 DocumentData *m_doc;
2008
2009 explicit Document(DocumentData *dataA);
2010};
2011
2012class BaseConverterPrivate;
2013class PSConverterPrivate;
2014class PDFConverterPrivate;
2022class POPPLER_QT5_EXPORT BaseConverter
2023{
2024 friend class Document;
2025
2026public:
2031
2033 void setOutputFileName(const QString &outputFileName);
2034
2040 void setOutputDevice(QIODevice *device);
2041
2047 virtual bool convert() = 0;
2048
2049 enum Error
2050 {
2051 NoError,
2052 FileLockedError,
2053 OpenOutputError,
2054 NotSupportedInputFileError
2055 };
2056
2061 Error lastError() const;
2062
2063protected:
2065 explicit BaseConverter(BaseConverterPrivate &dd);
2066 Q_DECLARE_PRIVATE(BaseConverter)
2067 BaseConverterPrivate *d_ptr;
2069
2070private:
2071 Q_DISABLE_COPY(BaseConverter)
2072};
2073
2090class POPPLER_QT5_EXPORT PSConverter : public BaseConverter
2091{
2092 friend class Document;
2093
2094public:
2101 {
2102 Printing = 0x00000001,
2103 StrictMargins = 0x00000002,
2104 ForceRasterization = 0x00000004,
2105 PrintToEPS = 0x00000008,
2106 HideAnnotations = 0x00000010,
2108 };
2109 Q_DECLARE_FLAGS(PSOptions, PSOption)
2110
2111
2114 ~PSConverter() override;
2115
2117 void setPageList(const QList<int> &pageList);
2118
2122 void setTitle(const QString &title);
2123
2127 void setHDPI(double hDPI);
2128
2132 void setVDPI(double vDPI);
2133
2137 void setRotate(int rotate);
2138
2142 void setPaperWidth(int paperWidth);
2143
2147 void setPaperHeight(int paperHeight);
2148
2152 void setRightMargin(int marginRight);
2153
2157 void setBottomMargin(int marginBottom);
2158
2162 void setLeftMargin(int marginLeft);
2163
2167 void setTopMargin(int marginTop);
2168
2176 void setStrictMargins(bool strictMargins);
2177
2186 void setForceOverprintPreview(bool forceOverprintPreview);
2187
2189 void setForceRasterize(bool forceRasterize);
2190
2196 void setPSOptions(PSOptions options);
2197
2205 PSOptions psOptions() const;
2206
2214 void setPageConvertedCallback(void (*callback)(int page, void *payload), void *payload);
2215
2216 bool convert() override;
2217
2218private:
2219 Q_DECLARE_PRIVATE(PSConverter)
2220 Q_DISABLE_COPY(PSConverter)
2221
2222 explicit PSConverter(DocumentData *document);
2223};
2224
2230class POPPLER_QT5_EXPORT PDFConverter : public BaseConverter
2231{
2232 friend class Document;
2233
2234public:
2239 {
2240 WithChanges = 0x00000001
2241 };
2242 Q_DECLARE_FLAGS(PDFOptions, PDFOption)
2243
2244
2247 ~PDFConverter() override;
2248
2252 void setPDFOptions(PDFOptions options);
2256 PDFOptions pdfOptions() const;
2257
2270 class POPPLER_QT5_EXPORT NewSignatureData
2271 {
2272 public:
2273 NewSignatureData();
2274 ~NewSignatureData();
2275 NewSignatureData(const NewSignatureData &) = delete;
2276 NewSignatureData &operator=(const NewSignatureData &) = delete;
2277
2278 QString certNickname() const;
2279 void setCertNickname(const QString &certNickname);
2280
2281 QString password() const;
2282 void setPassword(const QString &password);
2283
2284 int page() const;
2285 void setPage(int page);
2286
2287 QRectF boundingRectangle() const;
2288 void setBoundingRectangle(const QRectF &rect);
2289
2290 QString signatureText() const;
2291 void setSignatureText(const QString &text);
2292
2300 QString signatureLeftText() const;
2301 void setSignatureLeftText(const QString &text);
2302
2310 QString reason() const;
2311 void setReason(const QString &reason);
2312
2320 QString location() const;
2321 void setLocation(const QString &location);
2322
2326 double fontSize() const;
2327 void setFontSize(double fontSize);
2328
2334 double leftFontSize() const;
2335 void setLeftFontSize(double fontSize);
2336
2340 QColor fontColor() const;
2341 void setFontColor(const QColor &color);
2342
2346 QColor borderColor() const;
2347 void setBorderColor(const QColor &color);
2348
2356 double borderWidth() const;
2357 void setBorderWidth(double width);
2358
2362 QColor backgroundColor() const;
2363 void setBackgroundColor(const QColor &color);
2364
2368 QString fieldPartialName() const;
2369 void setFieldPartialName(const QString &name);
2370
2378 QByteArray documentOwnerPassword() const;
2379 void setDocumentOwnerPassword(const QByteArray &password);
2380
2388 QByteArray documentUserPassword() const;
2389 void setDocumentUserPassword(const QByteArray &password);
2390
2399 QString imagePath() const;
2400 void setImagePath(const QString &path);
2401
2402 private:
2403 struct NewSignatureDataPrivate;
2404 NewSignatureDataPrivate *const d;
2405 };
2406
2416 bool sign(const NewSignatureData &data);
2417
2435
2441
2448
2449 bool convert() override;
2450
2451private:
2452 Q_DECLARE_PRIVATE(PDFConverter)
2453 Q_DISABLE_COPY(PDFConverter)
2454
2455 explicit PDFConverter(DocumentData *document);
2456};
2457
2461POPPLER_QT5_EXPORT Q_DECL_DEPRECATED QDateTime convertDate(char *dateString);
2462
2468POPPLER_QT5_EXPORT QDateTime convertDate(const char *dateString);
2469
2475POPPLER_QT5_EXPORT bool isCmsAvailable();
2476
2482POPPLER_QT5_EXPORT bool isOverprintPreviewAvailable();
2483
2484class SoundData;
2494class POPPLER_QT5_EXPORT SoundObject
2495{
2496public:
2505
2516
2518 explicit SoundObject(const Sound *popplersound);
2520
2521 ~SoundObject();
2522
2527
2531 QString url() const;
2532
2536 QByteArray data() const;
2537
2541 double samplingRate() const;
2542
2546 int channels() const;
2547
2551 int bitsPerSample() const;
2552
2557
2558private:
2559 Q_DISABLE_COPY(SoundObject)
2560
2561 SoundData *m_soundData;
2562};
2563
2564class MovieData;
2570class POPPLER_QT5_EXPORT MovieObject
2571{
2572 friend class AnnotationPrivate;
2573
2574public:
2585
2586 ~MovieObject();
2587
2591 QString url() const;
2592
2596 QSize size() const;
2597
2601 int rotation() const;
2602
2606 bool showControls() const;
2607
2612
2617 bool showPosterImage() const;
2618
2625 QImage posterImage() const;
2626
2627private:
2629 explicit MovieObject(AnnotMovie *ann);
2631
2632 Q_DISABLE_COPY(MovieObject)
2633
2634 MovieData *m_movieData;
2635};
2636
2637}
2638
2639Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::PainterFlags)
2640Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::SearchFlags)
2641Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Document::RenderHints)
2642Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PDFConverter::PDFOptions)
2643Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PSConverter::PSOptions)
2644
2645#endif
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:204
Base converter.
Definition poppler-qt5.h:2023
virtual bool convert()=0
Does the conversion.
void setOutputDevice(QIODevice *device)
Sets the output device.
Error lastError() const
Returns the last error.
void setOutputFileName(const QString &outputFileName)
Sets the output file name.
virtual ~BaseConverter()
Destructor.
PDF document.
Definition poppler-qt5.h:1177
QString subject() const
The subject of the document.
RenderHints renderHints() const
The currently set render hints.
bool isLinearized() const
Test if the document is linearised.
bool setAuthor(const QString &val)
Set the author of the document to.
bool setTitle(const QString &val)
Set the title of the document to.
static Document * load(const QString &filePath, const QByteArray &ownerPassword=QByteArray(), const QByteArray &userPassword=QByteArray())
Load the document from a file on disk.
bool okToChange() const
Test if the permissions on the document allow it to be changed.
QString title() const
The title of the document.
bool okToCreateFormFields() const
Test if the permissions on the document allow interactive form fields (including signature fields) to...
PDFConverter * pdfConverter() const
Gets a new PDF converter for this document.
void getPdfVersion(int *major, int *minor) const
The version of the PDF specification that the document conforms to.
bool isLocked() const
Determine if the document is locked.
bool okToCopy() const
Test if the permissions on the document allow the contents to be copied / extracted.
QVector< OutlineItem > outline() const
Gets the outline of the document.
bool getPdfId(QByteArray *permanentId, QByteArray *updateId) const
The PDF identifiers.
int numPages() const
The number of pages in the document.
bool removeInfo()
Remove the document's Info dictionary.
PageLayout
The page layout.
Definition poppler-qt5.h:1199
@ TwoPageRight
Display the pages two at a time, with odd-numbered pages on the right.
Definition poppler-qt5.h:1206
@ TwoPageLeft
Display the pages two at a time, with odd-numbered pages on the left.
Definition poppler-qt5.h:1205
@ TwoColumnLeft
Display the pages in two columns, with odd-numbered pages on the left.
Definition poppler-qt5.h:1203
@ SinglePage
Display a single page.
Definition poppler-qt5.h:1201
@ NoLayout
Layout not specified.
Definition poppler-qt5.h:1200
@ TwoColumnRight
Display the pages in two columns, with odd-numbered pages on the right.
Definition poppler-qt5.h:1204
@ OneColumn
Display a single column of pages.
Definition poppler-qt5.h:1202
bool hasOptionalContent() const
Test whether this document has "optional content".
QDateTime date(const QString &type) const
The date associated with the document.
bool okToAddNotes() const
Test if the permissions on the document allow annotations to be added or modified,...
Page * page(const QString &label) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QDateTime creationDate() const
The date of the creation of the document.
bool setCreator(const QString &val)
Set the creator of the document to.
QDomDocument * toc() const
Gets the table of contents (TOC) of the Document.
void setRenderHint(RenderHint hint, bool on=true)
Sets the render hint .
bool setProducer(const QString &val)
Set the producer of the document to.
QStringList infoKeys() const
Obtain a list of the available string information keys.
void * colorDisplayProfile() const
Return the current display profile.
void setPaperColor(const QColor &color)
Sets the paper color.
RenderBackend
The render backends available.
Definition poppler-qt5.h:1215
@ ArthurBackend
Definition poppler-qt5.h:1217
@ SplashBackend
Splash backend.
Definition poppler-qt5.h:1216
@ QPainterBackend
Definition poppler-qt5.h:1218
static Document * loadFromData(const QByteArray &fileContents, const QByteArray &ownerPassword=QByteArray(), const QByteArray &userPassword=QByteArray())
Load the document from memory.
bool unlock(const QByteArray &ownerPassword, const QByteArray &userPassword)
Provide the passwords required to unlock the document.
QByteArray fontData(const FontInfo &fi) const
The font data if the font is an embedded one.
bool setDate(const QString &key, const QDateTime &val)
Set the Info dict date entry specified by.
PageMode
The page mode.
Definition poppler-qt5.h:1186
@ UseOutlines
Document outline visible.
Definition poppler-qt5.h:1188
@ UseAttach
Attachments panel visible.
Definition poppler-qt5.h:1192
@ UseNone
No mode - neither document outline nor thumbnail images are visible.
Definition poppler-qt5.h:1187
@ UseThumbs
Thumbnail images visible.
Definition poppler-qt5.h:1189
@ FullScreen
Fullscreen mode (no menubar, windows controls etc).
Definition poppler-qt5.h:1190
@ UseOC
Optional content group panel visible.
Definition poppler-qt5.h:1191
PdfVersion getPdfVersion() const
The version of the PDF specification that the document conforms to.
QDateTime modificationDate() const
The date of the last change in the document.
void setRenderBackend(RenderBackend backend)
Sets the backend used to render the pages.
RenderHint
The render hints available.
Definition poppler-qt5.h:1227
@ IgnorePaperColor
Do not compose with the paper color.
Definition poppler-qt5.h:1235
@ TextHinting
Hinting for text.
Definition poppler-qt5.h:1230
@ ThinLineShape
Enhance thin lines shape. Wins over ThinLineSolid.
Definition poppler-qt5.h:1234
@ HideAnnotations
Do not render annotations.
Definition poppler-qt5.h:1236
@ TextSlightHinting
Lighter hinting for text when combined with TextHinting.
Definition poppler-qt5.h:1231
@ OverprintPreview
Overprint preview.
Definition poppler-qt5.h:1232
@ TextAntialiasing
Antialiasing for text.
Definition poppler-qt5.h:1229
@ Antialiasing
Antialiasing for graphics.
Definition poppler-qt5.h:1228
@ ThinLineSolid
Enhance thin lines solid.
Definition poppler-qt5.h:1233
Qt::LayoutDirection textDirection() const
The predominant reading order for text as supplied by the document's viewer preferences.
QString metadata() const
Gets the metadata stream contents.
DocumentAdditionalActionsType
Describes the flags for additional document actions i.e.
Definition poppler-qt5.h:1930
@ CloseDocument
Performed before closing the document.
Definition poppler-qt5.h:1931
@ PrintDocumentStart
Performed before printing the document.
Definition poppler-qt5.h:1934
@ PrintDocumentFinish
Performed after printing the document.
Definition poppler-qt5.h:1935
@ SaveDocumentFinish
Performed after saving the document.
Definition poppler-qt5.h:1933
@ SaveDocumentStart
Performed before saving the document.
Definition poppler-qt5.h:1932
void setColorDisplayProfile(void *outputProfileA)
Set a color display profile for the current document.
bool okToPrintHighRes() const
Test if the permissions on the document allow it to be printed at high resolution.
QVector< FormFieldSignature * > signatures() const
Returns the signatures of this document.
Link * additionalAction(DocumentAdditionalActionsType type) const
Returns the additional action of the given type for the document or 0 if no action has been defined.
bool okToExtractForAccessibility() const
Test if the permissions on the document allow content extraction (text and perhaps other content) for...
bool setModificationDate(const QDateTime &val)
Set the modification date of the document to.
void * colorRgbProfile() const
Return the current RGB profile.
QString author() const
The author of the document.
bool isEncrypted() const
Test if the document is encrypted.
void setColorDisplayProfileName(const QString &name)
Set a color display profile for the current document.
static QSet< RenderBackend > availableRenderBackends()
The available rendering backends.
void applyResetFormsLink(const LinkResetForm &link)
Resets the form with the details contained in the link.
QList< EmbeddedFile * > embeddedFiles() const
The documents embedded within the PDF document.
bool okToAssemble() const
Test if the permissions on the document allow it to be "assembled" - insertion, rotation and deletion...
OptContentModel * optionalContentModel()
Itemviews model for optional content.
~Document()
Destructor.
QString creator() const
The creator of the document.
bool hasEmbeddedFiles() const
Whether there are any documents embedded in this PDF document.
FontIterator * newFontIterator(int startPage=0) const
Creates a new FontIterator object for font scanning.
QString producer() const
The producer of the document.
PSConverter * psConverter() const
Gets a new PS converter for this document.
PageLayout pageLayout() const
The layout that pages should be shown in when the document is first opened.
void setXRefReconstructedCallback(const std::function< void()> &callback)
Sets the document's XRef reconstruction callback, so whenever a XRef table reconstruction happens the...
bool setSubject(const QString &val)
Set the subject of the document to.
PageMode pageMode() const
The type of mode that should be used by the application when the document is opened.
FormType
Form types.
Definition poppler-qt5.h:1246
@ AcroForm
AcroForm.
Definition poppler-qt5.h:1248
@ XfaForm
Adobe XML Forms Architecture (XFA), currently unsupported.
Definition poppler-qt5.h:1249
@ NoForm
Document doesn't contain forms.
Definition poppler-qt5.h:1247
bool setCreationDate(const QDateTime &val)
Set the creation date of the document to.
static Document * load(QIODevice *device, const QByteArray &ownerPassword=QByteArray(), const QByteArray &userPassword=QByteArray())
Load the document from a device.
FormType formType() const
Returns the type of forms contained in the document.
QList< FontInfo > fonts() const
The fonts within the PDF document.
bool xrefWasReconstructed() const
Returns whether the document's XRef table has been reconstructed or not.
QColor paperColor() const
The paper color.
QString keywords() const
The keywords of the document.
LinkDestination * linkDestination(const QString &name)
Tries to resolve the named destination name.
bool okToPrint() const
Test if the permissions on the document allow it to be printed.
Page * page(int index) const
Get a specified Page.
RenderBackend renderBackend() const
The currently set render backend.
QVector< int > formCalculateOrder() const
Returns the calculate order for forms (using their id).
bool setKeywords(const QString &val)
Set the keywords of the document to.
QStringList scripts() const
Document-level JavaScript scripts.
QString info(const QString &type) const
Get specified information associated with the document.
bool setInfo(const QString &key, const QString &val)
Set the value of the document's Info dictionary entry specified by.
bool okToFillForm() const
Test if the permissions on the document allow interactive form fields (including signature fields) to...
bool isValid() const
Is the embedded file valid?
QString description() const
The description associated with the file, if any.
~EmbeddedFile()
Destructor.
QByteArray checksum() const
The MD5 checksum of the file.
QString name() const
The name associated with the file.
QString mimeType() const
The MIME type of the file, if known.
QDateTime createDate() const
The creation date for the embedded file, if known.
QDateTime modDate() const
The modification date for the embedded file, if known.
int size() const
The size of the file.
QByteArray data()
The data as a byte array.
Container class for information about a font within a PDF document.
Definition poppler-qt5.h:208
Type type() const
The type of font encoding.
FontInfo & operator=(const FontInfo &fi)
Standard assignment operator.
QString name() const
The name of the font.
QString typeName() const
The name of the font encoding used.
QString file() const
The path of the font file used to represent this font on this system, or a null string is the font is...
FontInfo(const FontInfo &fi)
Copy constructor.
Type
The type of font.
Definition poppler-qt5.h:216
QString substituteName() const
The name of the substitute font.
bool isSubset() const
Whether the font provided is only a subset of the full font or not.
~FontInfo()
Destructor.
bool isEmbedded() const
Whether the font is embedded in the file, or not.
Iterator for reading the fonts in a document.
Definition poppler-qt5.h:334
int currentPage() const
Returns the current page where the iterator is.
~FontIterator()
Destructor.
bool hasNext() const
Checks whether there is at least one more page to iterate, ie returns false when the iterator is beyo...
QList< FontInfo > next()
Returns the fonts of the current page and then advances the iterator to the next page.
A form field that represents a signature.
Definition poppler-form.h:854
The base class representing a form field.
Definition poppler-form.h:95
A destination.
Definition poppler-link.h:74
ResetForm: an action to reset form fields.
Definition poppler-link.h:708
Container class for a movie object in a PDF document.
Definition poppler-qt5.h:2571
QString url() const
The URL of the movie to be played.
bool showControls() const
Whether show a bar with movie controls.
int rotation() const
The rotation (either 0, 90, 180, or 270 degrees clockwise) for the movie,.
bool showPosterImage() const
Returns whether a poster image should be shown if the movie is not playing.
QSize size() const
The size of the movie.
QImage posterImage() const
Returns the poster image that should be shown if the movie is not playing.
PlayMode
The play mode for playing the movie.
Definition poppler-qt5.h:2579
@ PlayPalindrome
Play forward, then backward, then again foward and so on until stopped.
Definition poppler-qt5.h:2583
@ PlayRepeat
Play continuously until stopped.
Definition poppler-qt5.h:2582
@ PlayOnce
Play the movie once, closing the movie controls at the end.
Definition poppler-qt5.h:2580
@ PlayOpen
Like PlayOnce, but leaving the controls open.
Definition poppler-qt5.h:2581
PlayMode playMode() const
How to play the movie.
Model for optional content.
Definition poppler-optcontent.h:50
QString uri() const
The URI to which the item links.
QString name() const
The name of the item which should be displayed to the user.
QVector< OutlineItem > children() const
Gets the child items of this item.
QSharedPointer< const LinkDestination > destination() const
The destination referred to by this item.
bool isOpen() const
Indicates whether the item should initially be display in an expanded or collapsed state.
OutlineItem()
Constructs a null item, i.e.
bool isNull() const
Indicates whether an item is null, i.e.
QString externalFileName() const
The external file name of the document to which the.
bool hasChildren() const
Determines if this item has any child items.
Holds data for a new signature.
Definition poppler-qt5.h:2271
QColor backgroundColor() const
Default: QColor(240, 240, 240).
QColor fontColor() const
Default: red.
QColor borderColor() const
Default: red.
double fontSize() const
Default: 10.
double borderWidth() const
border width in points
QString location() const
Signature's property Location.
QString signatureLeftText() const
If this text is not empty, the signature representation will split in two, with this text on the left...
QString fieldPartialName() const
Default: QUuid::createUuid().toString().
double leftFontSize() const
Default: 20.
QByteArray documentOwnerPassword() const
Document owner password (needed if the document that is being signed is password protected).
QString reason() const
Signature's property Reason.
QByteArray documentUserPassword() const
Document user password (needed if the document that is being signed is password protected).
QString imagePath() const
Filesystem path to an image file to be used as background image for the signature annotation widget.
Converts a PDF to PDF (thus saves a copy of the document).
Definition poppler-qt5.h:2231
bool convert() override
Does the conversion.
ErrorString lastSigningErrorDetails() const
A string with a string that might offer more details of the signing result failure.
PDFOption
Options for the PDF export.
Definition poppler-qt5.h:2239
@ WithChanges
The changes done to the document are saved as well.
Definition poppler-qt5.h:2240
~PDFConverter() override
Destructor.
void setPDFOptions(PDFOptions options)
Sets the options for the PDF export.
PDFOptions pdfOptions() const
The currently set options for the PDF export.
bool sign(const NewSignatureData &data)
Sign PDF at given Annotation / signature form.
SigningResult
Definition poppler-qt5.h:2424
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-qt5.h:2426
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-qt5.h:2428
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-qt5.h:2429
@ UserCancelled
User cancelled the process.
Definition poppler-qt5.h:2431
@ GenericSigningError
Unclassified error.
Definition poppler-qt5.h:2427
@ BadPassphrase
User entered bad passphrase.
Definition poppler-qt5.h:2432
@ UnsupportedSignatureType
User asked for a signature type that the current backend/key combo can't deliver.
Definition poppler-qt5.h:2433
@ WriteFailed
Write failed (permissions, faulty disk, ...).
Definition poppler-qt5.h:2430
@ SigningSuccess
No error.
Definition poppler-qt5.h:2425
SigningResult lastSigningResult() const
The last signing result, mostly relevant if sign returns false.
Converts a PDF to PS.
Definition poppler-qt5.h:2091
void setPSOptions(PSOptions options)
Sets the options for the PS export.
void setStrictMargins(bool strictMargins)
Defines if margins have to be strictly followed (even if that means changing aspect ratio),...
PSOption
Options for the PS export.
Definition poppler-qt5.h:2101
@ ForceOverprintPreview
Force rasterized overprint preview during conversion.
Definition poppler-qt5.h:2107
@ Printing
The PS is generated for printing purposes.
Definition poppler-qt5.h:2102
@ HideAnnotations
Don't print annotations.
Definition poppler-qt5.h:2106
@ PrintToEPS
Output EPS instead of PS.
Definition poppler-qt5.h:2105
void setPageConvertedCallback(void(*callback)(int page, void *payload), void *payload)
Sets a function that will be called each time a page is converted.
void setRightMargin(int marginRight)
Sets the output right margin.
void setBottomMargin(int marginBottom)
Sets the output bottom margin.
bool convert() override
Does the conversion.
void setTopMargin(int marginTop)
Sets the output top margin.
void setForceOverprintPreview(bool forceOverprintPreview)
Defines if the page will be rasterized to an image with overprint preview enabled before printing.
~PSConverter() override
Destructor.
void setVDPI(double vDPI)
Sets the vertical DPI.
void setLeftMargin(int marginLeft)
Sets the output left margin.
void setPaperHeight(int paperHeight)
Sets the output paper height.
void setTitle(const QString &title)
Sets the title of the PS Document.
void setPageList(const QList< int > &pageList)
Sets the list of pages to print.
void setForceRasterize(bool forceRasterize)
Defines if the page will be rasterized to an image before printing.
void setHDPI(double hDPI)
Sets the horizontal DPI.
void setPaperWidth(int paperWidth)
Sets the output paper width.
void setRotate(int rotate)
Sets the rotate.
PSOptions psOptions() const
The currently set options for the PS export.
Describes how a PDF file viewer shall perform the transition from one page to another.
Definition poppler-page-transition.h:48
void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown)
The default CTM.
bool(*)(const QVariant &) ShouldRenderToImagePartialQueryFunc
Partial Update query renderToImage callback.
Definition poppler-qt5.h:580
QList< Link * > links() const
Gets the links of the page.
Orientation
Types of orientations that are possible.
Definition poppler-qt5.h:946
@ UpsideDown
Upside down orientation (portrait, with 180 degrees rotation).
Definition poppler-qt5.h:950
@ Seascape
Seascape orientation (portrait, with 270 degrees clockwise rotation).
Definition poppler-qt5.h:949
@ Landscape
Landscape orientation (portrait, with 90 degrees clockwise rotation ).
Definition poppler-qt5.h:947
@ Portrait
Normal portrait orientation.
Definition poppler-qt5.h:948
QList< TextBox * > textList(Rotation rotate=Rotate0) const
Returns a list of text of the page.
SearchFlag
Flags to modify the search behaviour.
Definition poppler-qt5.h:800
@ NoSearchFlags
since 0.63
Definition poppler-qt5.h:801
@ IgnoreCase
Case differences are ignored.
Definition poppler-qt5.h:802
@ WholeWords
Only whole words are matched.
Definition poppler-qt5.h:803
@ AcrossLines
Allows to match on text spanning from end of a line to the next line.
Definition poppler-qt5.h:807
@ IgnoreDiacritics
Diacritic differences (eg.
Definition poppler-qt5.h:804
bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate=Rotate0) const
Returns true if the specified text was found.
void addAnnotation(const Annotation *ann)
Adds an annotation to the page.
QString text(const QRectF &rect, TextLayout textLayout) const
Returns the text that is inside a specified rectangle.
QSizeF pageSizeF() const
PageTransition * transition() const
Returns the transition of this page.
QList< Annotation * > annotations(const QSet< Annotation::SubType > &subtypes) const
Returns the annotations of the page.
int index() const
Returns the index of the page.
SearchDirection
The starting point for a search.
Definition poppler-qt5.h:781
@ PreviousResult
Find the previous result, moving "up the page".
Definition poppler-qt5.h:784
@ FromTop
Start sorting at the top of the document.
Definition poppler-qt5.h:782
@ NextResult
Find the next result, moving "down the page".
Definition poppler-qt5.h:783
PainterFlag
Additional flags for the renderToPainter method.
Definition poppler-qt5.h:508
@ NoPainterFlags
Definition poppler-qt5.h:509
@ DontSaveAndRestore
Do not save/restore the caller-owned painter.
Definition poppler-qt5.h:517
Link * action(PageAction act) const
Gets the page action specified, or NULL if there is no action.
QList< FormField * > formFields() const
Returns the form fields on the page The caller gets the ownership of the returned objects.
QImage thumbnail() const
Get the page thumbnail if it exists.
Rotation
The type of rotation to apply for an operation.
Definition poppler-qt5.h:476
@ Rotate270
Rotate 270 degrees clockwise (90 degrees counterclockwise).
Definition poppler-qt5.h:480
@ Rotate90
Rotate 90 degrees clockwise.
Definition poppler-qt5.h:478
@ Rotate0
Do not rotate.
Definition poppler-qt5.h:477
@ Rotate180
Rotate 180 degrees.
Definition poppler-qt5.h:479
~Page()
Destructor.
Orientation orientation() const
The orientation of the page.
SearchMode
The type of search to perform.
Definition poppler-qt5.h:791
@ CaseSensitive
Case differences cause no match in searching.
Definition poppler-qt5.h:792
@ CaseInsensitive
Case differences are ignored in matching.
Definition poppler-qt5.h:793
TextLayout
How the text is going to be returned.
Definition poppler-qt5.h:497
@ ReadingOrder
The text is returned in reading order,.
Definition poppler-qt5.h:500
@ RawOrderLayout
The text is returned without any type of processing.
Definition poppler-qt5.h:499
@ PhysicalLayout
The text is layouted to resemble the real page layout.
Definition poppler-qt5.h:498
PageAction
The kinds of page actions.
Definition poppler-qt5.h:487
@ Closing
The action when a page is "closed".
Definition poppler-qt5.h:489
@ Opening
The action when a page is "opened".
Definition poppler-qt5.h:488
QSize pageSize() const
double duration() const
Returns the page duration.
void(*)(const QImage &, const QVariant &) RenderToImagePartialUpdateFunc
Partial Update renderToImage callback.
Definition poppler-qt5.h:570
QString label() const
Returns the label of the page, or a null string is the page has no label.
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
Render the page to a QImage using the current Document renderer.
QList< Annotation * > annotations() const
Returns the annotations of the page.
bool renderToPainter(QPainter *painter, double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1, Rotation rotate=Rotate0, PainterFlags flags=NoPainterFlags) const
Render the page to the specified QPainter using the current Document renderer.
void removeAnnotation(const Annotation *ann)
Removes an annotation from the page and destroys the annotation object.
bool(*)(const QVariant &) ShouldAbortQueryFunc
Abort query function callback.
Definition poppler-qt5.h:641
Container class for a sound file in a PDF document.
Definition poppler-qt5.h:2495
double samplingRate() const
The sampling rate of the sound.
SoundEncoding soundEncoding() const
The encoding used for the sound.
int channels() const
The number of sound channels to use to play the sound.
SoundType soundType() const
Is the sound embedded (SoundObject::Embedded) or external (SoundObject::External)?
QString url() const
The URL of the sound file to be played, in case of SoundObject::External.
SoundEncoding
The encoding format used for the sound.
Definition poppler-qt5.h:2510
@ ALaw
A-law-encoded samples.
Definition poppler-qt5.h:2514
@ muLaw
mu-law-encoded samples
Definition poppler-qt5.h:2513
@ Signed
Twos-complement values.
Definition poppler-qt5.h:2512
@ Raw
Raw encoding, with unspecified or unsigned values in the range [ 0, 2^B - 1 ].
Definition poppler-qt5.h:2511
SoundType
The type of sound.
Definition poppler-qt5.h:2501
@ External
The real sound file is external.
Definition poppler-qt5.h:2502
@ Embedded
The sound is contained in the data.
Definition poppler-qt5.h:2503
int bitsPerSample() const
The number of bits per sample value per channel.
QByteArray data() const
The data of the sound, in case of SoundObject::Embedded.
Describes the physical location of text on a document page.
Definition poppler-qt5.h:151
bool hasSpaceAfter() const
Returns whether there is a space character after this text box.
TextBox(const QString &text, const QRectF &bBox)
The default constructor sets the text and the rectangle that contains the text.
QString text() const
Returns the text of this text box.
~TextBox()
Destructor.
QRectF charBoundingBox(int i) const
Returns the bounding box of the i -th characted of the word.
TextBox * nextWord() const
Returns the pointer to the next text box, if there is one.
QRectF boundingBox() const
Returns the position of the text, in point, i.e., 1/72 of an inch.
The Poppler Qt5 binding.
Definition poppler-annotation.h:51
QDateTime convertDate(char *dateString)
Conversion from PDF date string format to QDateTime.
void(*)(const QString &, const QVariant &) PopplerDebugFunc
Debug/error function.
Definition poppler-qt5.h:102
bool isOverprintPreviewAvailable()
Whether the overprint preview functionality is available.
ErrorStringType
The various types of error strings.
Definition poppler-qt5.h:123
@ ErrorCodeString
The string should be treated like a error code.
Definition poppler-qt5.h:125
@ UserString
The string should be treated as an advanced error message that can be shown to user.
Definition poppler-qt5.h:127
bool isCmsAvailable()
Whether the color management functions are available.
void setDebugErrorFunction(PopplerDebugFunc debugFunction, const QVariant &closure)
Set a new debug/error output function.
The version specification of a pdf file.
Definition poppler-qt5.h:1695
Combination of an error data and type of error string.
Definition poppler-qt5.h:136