Poppler Qt5 26.01.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 *
37 * This program is free software; you can redistribute it and/or modify
38 * it under the terms of the GNU General Public License as published by
39 * the Free Software Foundation; either version 2, or (at your option)
40 * any later version.
41 *
42 * This program is distributed in the hope that it will be useful,
43 * but WITHOUT ANY WARRANTY; without even the implied warranty of
44 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 * GNU General Public License for more details.
46 *
47 * You should have received a copy of the GNU General Public License
48 * along with this program; if not, write to the Free Software
49 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
50 */
51
52#ifndef __POPPLER_QT_H__
53#define __POPPLER_QT_H__
54
55#include <functional>
56
57#include "poppler-annotation.h"
58#include "poppler-link.h"
59#include "poppler-optcontent.h"
60#include "poppler-page-transition.h"
61
62#include <QtCore/QByteArray>
63#include <QtCore/QDateTime>
64#include <QtCore/QSet>
65#include <QtXml/QDomDocument>
66#include "poppler-export.h"
67
68class EmbFile;
69class Sound;
70class AnnotMovie;
71
75namespace Poppler {
76
77class Document;
78class DocumentData;
79
80class PageData;
81
82class FormField;
84
85class TextBoxData;
86
87class PDFConverter;
88class PSConverter;
89
90struct OutlineItemData;
91
101using PopplerDebugFunc = void (*)(const QString & /*message*/, const QVariant & /*closure*/);
102
114POPPLER_QT5_EXPORT void setDebugErrorFunction(PopplerDebugFunc debugFunction, const QVariant &closure);
115
128
135{
136 QVariant data;
137 ErrorStringType type;
138};
139
149class POPPLER_QT5_EXPORT TextBox
150{
151 friend class Page;
152
153public:
159 TextBox(const QString &text, const QRectF &bBox);
164
168 QString text() const;
169
176 QRectF boundingBox() const;
177
184
188 QRectF charBoundingBox(int i) const;
189
193 bool hasSpaceAfter() const;
194
195private:
196 Q_DISABLE_COPY(TextBox)
197
198 TextBoxData *m_data;
199};
200
201class FontInfoData;
206class POPPLER_QT5_EXPORT FontInfo
207{
208 friend class Document;
209
210public:
214 enum Type
215 {
216 unknown,
217 Type1,
218 Type1C,
219 Type1COT,
220 Type3,
221 TrueType,
222 TrueTypeOT,
223 CIDType0,
224 CIDType0C,
225 CIDType0COT,
226 CIDTrueType,
227 CIDTrueTypeOT
228 };
229
231
234 FontInfo();
235
239 explicit FontInfo(const FontInfoData &fid);
241
245 FontInfo(const FontInfo &fi);
246
251
255 QString name() const;
256
261 QString substituteName() const;
262
267 QString file() const;
268
274 bool isEmbedded() const;
275
282 bool isSubset() const;
283
291 Type type() const;
292
301 QString typeName() const;
302
307
308private:
309 FontInfoData *m_data;
310};
311
312class FontIteratorData;
332class POPPLER_QT5_EXPORT FontIterator
333{
334 friend class Document;
335 friend class DocumentData;
336
337public:
342
347 QList<FontInfo> next();
348
353 bool hasNext() const;
354
358 int currentPage() const;
359
360private:
361 Q_DISABLE_COPY(FontIterator)
362 FontIterator(int, DocumentData *dd);
363
364 FontIteratorData *d;
365};
366
367class EmbeddedFileData;
371class POPPLER_QT5_EXPORT EmbeddedFile
372{
373 friend class DocumentData;
374 friend class AnnotationPrivate;
375
376public:
378 explicit EmbeddedFile(EmbFile *embfile);
380
385
389 QString name() const;
390
396 QString description() const;
397
403 int size() const;
404
408 QDateTime modDate() const;
409
413 QDateTime createDate() const;
414
420 QByteArray checksum() const;
421
427 QString mimeType() const;
428
432 QByteArray data();
433
439 bool isValid() const;
440
444 // QDataStream dataStream() const;
445
446private:
447 Q_DISABLE_COPY(EmbeddedFile)
448 explicit EmbeddedFile(EmbeddedFileData &dd);
449
450 EmbeddedFileData *m_embeddedFile;
451};
452
461class POPPLER_QT5_EXPORT Page
462{
463 friend class Document;
464
465public:
470
475 {
480 };
481
490
501
507 {
508 NoPainterFlags = 0x00000000,
517 };
518 Q_DECLARE_FLAGS(PainterFlags, PainterFlag)
519
520
558 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;
559
569 using RenderToImagePartialUpdateFunc = void (*)(const QImage & /*image*/, const QVariant & /*closure*/);
570
579 using ShouldRenderToImagePartialQueryFunc = bool (*)(const QVariant & /*closure*/);
580
630 QImage renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate, RenderToImagePartialUpdateFunc partialUpdateCallback, ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
631 const QVariant &payload) const;
632
640 using ShouldAbortQueryFunc = bool (*)(const QVariant & /*closure*/);
641
695 QImage renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate, RenderToImagePartialUpdateFunc partialUpdateCallback, ShouldRenderToImagePartialQueryFunc shouldDoPartialUpdateCallback,
696 ShouldAbortQueryFunc shouldAbortRenderCallback, const QVariant &payload) const;
697
740 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;
741
750 QImage thumbnail() const;
751
764 QString text(const QRectF &rect, TextLayout textLayout) const;
765
774 QString text(const QRectF &rect) const;
775
785
794
799 {
800 NoSearchFlags = 0x00000000,
801 IgnoreCase = 0x00000001,
802 WholeWords = 0x00000002,
803 IgnoreDiacritics = 0x00000004,
806 AcrossLines = 0x00000008
809 };
810 Q_DECLARE_FLAGS(SearchFlags, SearchFlag)
811
812
823 Q_DECL_DEPRECATED bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
824
837 bool search(const QString &text, double &sLeft, double &sTop, double &sRight, double &sBottom, SearchDirection direction, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
838
850 Q_DECL_DEPRECATED QList<QRectF> search(const QString &text, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
851
866 QList<QRectF> search(const QString &text, SearchFlags flags = NoSearchFlags, Rotation rotate = Rotate0) const;
867
884 QList<TextBox *> textList(Rotation rotate = Rotate0) const;
885
910 QList<TextBox *> textList(Rotation rotate, ShouldAbortQueryFunc shouldAbortExtractionCallback, const QVariant &closure) const;
911
915 QSizeF pageSizeF() const;
916
920 QSize pageSize() const;
921
933
939 Link *action(PageAction act) const;
940
951
956
960 void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown);
961
965 QList<Link *> links() const;
966
975 QList<Annotation *> annotations() const;
976
989 QList<Annotation *> annotations(const QSet<Annotation::SubType> &subtypes) const;
990
998 void addAnnotation(const Annotation *ann);
999
1007
1014 QList<FormField *> formFields() const;
1015
1023 double duration() const;
1024
1030 QString label() const;
1031
1037 int index() const;
1038
1039private:
1040 Q_DISABLE_COPY(Page)
1041
1042 Page(DocumentData *doc, int index);
1043 PageData *m_page;
1044};
1045
1053class POPPLER_QT5_EXPORT OutlineItem
1054{
1055 friend class Document;
1056
1057public:
1062 ~OutlineItem();
1063
1064 OutlineItem(const OutlineItem &other);
1065 OutlineItem &operator=(const OutlineItem &other);
1066
1067 OutlineItem(OutlineItem &&other) noexcept;
1068 OutlineItem &operator=(OutlineItem &&other) noexcept;
1069
1073 bool isNull() const;
1074
1078 QString name() const;
1079
1083 bool isOpen() const;
1084
1090 QSharedPointer<const LinkDestination> destination() const;
1091
1097 QString externalFileName() const;
1098
1104 QString uri() const;
1105
1111 bool hasChildren() const;
1112
1118 QVector<OutlineItem> children() const;
1119
1120private:
1121 explicit OutlineItem(OutlineItemData *data);
1122 OutlineItemData *m_data;
1123};
1124
1175class POPPLER_QT5_EXPORT Document
1176{
1177 friend class Page;
1178 friend class DocumentData;
1179
1180public:
1193
1207
1219
1226 {
1227 Antialiasing = 0x00000001,
1228 TextAntialiasing = 0x00000002,
1229 TextHinting = 0x00000004,
1230 TextSlightHinting = 0x00000008,
1231 OverprintPreview = 0x00000010,
1232 ThinLineSolid = 0x00000020,
1233 ThinLineShape = 0x00000040,
1234 IgnorePaperColor = 0x00000080,
1235 HideAnnotations = 0x00000100
1236 };
1237 Q_DECLARE_FLAGS(RenderHints, RenderHint)
1238
1239
1250
1263 void setColorDisplayProfile(void *outputProfileA);
1273 void setColorDisplayProfileName(const QString &name);
1284 void *colorRgbProfile() const;
1295 void *colorDisplayProfile() const;
1296
1314 static Document *load(const QString &filePath, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1315
1340 static Document *load(QIODevice *device, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1341
1363 static Document *loadFromData(const QByteArray &fileContents, const QByteArray &ownerPassword = QByteArray(), const QByteArray &userPassword = QByteArray());
1364
1382 Page *page(int index) const;
1383
1396 Page *page(const QString &label) const;
1397
1401 int numPages() const;
1402
1409
1416
1423 Qt::LayoutDirection textDirection() const;
1424
1433 bool unlock(const QByteArray &ownerPassword, const QByteArray &userPassword);
1434
1438 bool isLocked() const;
1439
1455 QDateTime date(const QString &type) const;
1456
1462 bool setDate(const QString &key, const QDateTime &val);
1463
1467 QDateTime creationDate() const;
1468
1474 bool setCreationDate(const QDateTime &val);
1475
1479 QDateTime modificationDate() const;
1480
1486 bool setModificationDate(const QDateTime &val);
1487
1504 QString info(const QString &type) const;
1505
1511 bool setInfo(const QString &key, const QString &val);
1512
1516 QString title() const;
1517
1523 bool setTitle(const QString &val);
1524
1528 QString author() const;
1529
1535 bool setAuthor(const QString &val);
1536
1540 QString subject() const;
1541
1547 bool setSubject(const QString &val);
1548
1552 QString keywords() const;
1553
1559 bool setKeywords(const QString &val);
1560
1564 QString creator() const;
1565
1571 bool setCreator(const QString &val);
1572
1576 QString producer() const;
1577
1583 bool setProducer(const QString &val);
1584
1591
1595 QStringList infoKeys() const;
1596
1600 bool isEncrypted() const;
1601
1608 bool isLinearized() const;
1609
1614 bool okToPrint() const;
1615
1620 bool okToPrintHighRes() const;
1621
1629 bool okToChange() const;
1630
1635 bool okToCopy() const;
1636
1642 bool okToAddNotes() const;
1643
1651 bool okToFillForm() const;
1652
1659
1666
1674 bool okToAssemble() const;
1675
1690 Q_DECL_DEPRECATED void getPdfVersion(int *major, int *minor) const;
1691
1694 {
1695 int major;
1696 int minor;
1697 };
1698
1706
1718 QList<FontInfo> fonts() const;
1719
1735 FontIterator *newFontIterator(int startPage = 0) const;
1736
1742 QByteArray fontData(const FontInfo &fi) const;
1743
1750 QList<EmbeddedFile *> embeddedFiles() const;
1751
1755 bool hasEmbeddedFiles() const;
1756
1780 Q_DECL_DEPRECATED QDomDocument *toc() const;
1781
1789 QVector<OutlineItem> outline() const;
1790
1799 LinkDestination *linkDestination(const QString &name);
1800
1806 void setPaperColor(const QColor &color);
1812 QColor paperColor() const;
1813
1830
1836 static QSet<RenderBackend> availableRenderBackends();
1837
1847 void setRenderHint(RenderHint hint, bool on = true);
1853 RenderHints renderHints() const;
1854
1863
1872
1878 QString metadata() const;
1879
1893
1902
1909
1918 QStringList scripts() const;
1919
1936
1944
1957 bool getPdfId(QByteArray *permanentId, QByteArray *updateId) const;
1958
1965
1971 QVector<int> formCalculateOrder() const;
1972
1981 QVector<FormFieldSignature *> signatures() const;
1982
1989
1996 void setXRefReconstructedCallback(const std::function<void()> &callback);
1997
2002
2003private:
2004 Q_DISABLE_COPY(Document)
2005
2006 DocumentData *m_doc;
2007
2008 explicit Document(DocumentData *dataA);
2009};
2010
2011class BaseConverterPrivate;
2012class PSConverterPrivate;
2013class PDFConverterPrivate;
2021class POPPLER_QT5_EXPORT BaseConverter
2022{
2023 friend class Document;
2024
2025public:
2030
2032 void setOutputFileName(const QString &outputFileName);
2033
2039 void setOutputDevice(QIODevice *device);
2040
2046 virtual bool convert() = 0;
2047
2048 enum Error
2049 {
2050 NoError,
2051 FileLockedError,
2052 OpenOutputError,
2053 NotSupportedInputFileError
2054 };
2055
2060 Error lastError() const;
2061
2062protected:
2064 explicit BaseConverter(BaseConverterPrivate &dd);
2065 Q_DECLARE_PRIVATE(BaseConverter)
2066 BaseConverterPrivate *d_ptr;
2068
2069private:
2070 Q_DISABLE_COPY(BaseConverter)
2071};
2072
2089class POPPLER_QT5_EXPORT PSConverter : public BaseConverter
2090{
2091 friend class Document;
2092
2093public:
2100 {
2101 Printing = 0x00000001,
2102 StrictMargins = 0x00000002,
2103 ForceRasterization = 0x00000004,
2104 PrintToEPS = 0x00000008,
2105 HideAnnotations = 0x00000010,
2107 };
2108 Q_DECLARE_FLAGS(PSOptions, PSOption)
2109
2110
2113 ~PSConverter() override;
2114
2116 void setPageList(const QList<int> &pageList);
2117
2121 void setTitle(const QString &title);
2122
2126 void setHDPI(double hDPI);
2127
2131 void setVDPI(double vDPI);
2132
2136 void setRotate(int rotate);
2137
2141 void setPaperWidth(int paperWidth);
2142
2146 void setPaperHeight(int paperHeight);
2147
2151 void setRightMargin(int marginRight);
2152
2156 void setBottomMargin(int marginBottom);
2157
2161 void setLeftMargin(int marginLeft);
2162
2166 void setTopMargin(int marginTop);
2167
2175 void setStrictMargins(bool strictMargins);
2176
2185 void setForceOverprintPreview(bool forceOverprintPreview);
2186
2188 void setForceRasterize(bool forceRasterize);
2189
2195 void setPSOptions(PSOptions options);
2196
2204 PSOptions psOptions() const;
2205
2213 void setPageConvertedCallback(void (*callback)(int page, void *payload), void *payload);
2214
2215 bool convert() override;
2216
2217private:
2218 Q_DECLARE_PRIVATE(PSConverter)
2219 Q_DISABLE_COPY(PSConverter)
2220
2221 explicit PSConverter(DocumentData *document);
2222};
2223
2229class POPPLER_QT5_EXPORT PDFConverter : public BaseConverter
2230{
2231 friend class Document;
2232
2233public:
2238 {
2239 WithChanges = 0x00000001
2240 };
2241 Q_DECLARE_FLAGS(PDFOptions, PDFOption)
2242
2243
2246 ~PDFConverter() override;
2247
2251 void setPDFOptions(PDFOptions options);
2255 PDFOptions pdfOptions() const;
2256
2269 class POPPLER_QT5_EXPORT NewSignatureData
2270 {
2271 public:
2272 NewSignatureData();
2273 ~NewSignatureData();
2274 NewSignatureData(const NewSignatureData &) = delete;
2275 NewSignatureData &operator=(const NewSignatureData &) = delete;
2276
2277 QString certNickname() const;
2278 void setCertNickname(const QString &certNickname);
2279
2280 QString password() const;
2281 void setPassword(const QString &password);
2282
2283 int page() const;
2284 void setPage(int page);
2285
2286 QRectF boundingRectangle() const;
2287 void setBoundingRectangle(const QRectF &rect);
2288
2289 QString signatureText() const;
2290 void setSignatureText(const QString &text);
2291
2299 QString signatureLeftText() const;
2300 void setSignatureLeftText(const QString &text);
2301
2309 QString reason() const;
2310 void setReason(const QString &reason);
2311
2319 QString location() const;
2320 void setLocation(const QString &location);
2321
2325 double fontSize() const;
2326 void setFontSize(double fontSize);
2327
2333 double leftFontSize() const;
2334 void setLeftFontSize(double fontSize);
2335
2339 QColor fontColor() const;
2340 void setFontColor(const QColor &color);
2341
2345 QColor borderColor() const;
2346 void setBorderColor(const QColor &color);
2347
2355 double borderWidth() const;
2356 void setBorderWidth(double width);
2357
2361 QColor backgroundColor() const;
2362 void setBackgroundColor(const QColor &color);
2363
2367 QString fieldPartialName() const;
2368 void setFieldPartialName(const QString &name);
2369
2377 QByteArray documentOwnerPassword() const;
2378 void setDocumentOwnerPassword(const QByteArray &password);
2379
2387 QByteArray documentUserPassword() const;
2388 void setDocumentUserPassword(const QByteArray &password);
2389
2398 QString imagePath() const;
2399 void setImagePath(const QString &path);
2400
2401 private:
2402 struct NewSignatureDataPrivate;
2403 NewSignatureDataPrivate *const d;
2404 };
2405
2415 bool sign(const NewSignatureData &data);
2416
2433
2439
2446
2447 bool convert() override;
2448
2449private:
2450 Q_DECLARE_PRIVATE(PDFConverter)
2451 Q_DISABLE_COPY(PDFConverter)
2452
2453 explicit PDFConverter(DocumentData *document);
2454};
2455
2459POPPLER_QT5_EXPORT Q_DECL_DEPRECATED QDateTime convertDate(char *dateString);
2460
2466POPPLER_QT5_EXPORT QDateTime convertDate(const char *dateString);
2467
2473POPPLER_QT5_EXPORT bool isCmsAvailable();
2474
2480POPPLER_QT5_EXPORT bool isOverprintPreviewAvailable();
2481
2482class SoundData;
2492class POPPLER_QT5_EXPORT SoundObject
2493{
2494public:
2503
2514
2516 explicit SoundObject(Sound *popplersound);
2518
2519 ~SoundObject();
2520
2525
2529 QString url() const;
2530
2534 QByteArray data() const;
2535
2539 double samplingRate() const;
2540
2544 int channels() const;
2545
2549 int bitsPerSample() const;
2550
2555
2556private:
2557 Q_DISABLE_COPY(SoundObject)
2558
2559 SoundData *m_soundData;
2560};
2561
2562class MovieData;
2568class POPPLER_QT5_EXPORT MovieObject
2569{
2570 friend class AnnotationPrivate;
2571
2572public:
2583
2584 ~MovieObject();
2585
2589 QString url() const;
2590
2594 QSize size() const;
2595
2599 int rotation() const;
2600
2604 bool showControls() const;
2605
2610
2615 bool showPosterImage() const;
2616
2623 QImage posterImage() const;
2624
2625private:
2627 explicit MovieObject(AnnotMovie *ann);
2629
2630 Q_DISABLE_COPY(MovieObject)
2631
2632 MovieData *m_movieData;
2633};
2634
2635}
2636
2637Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::PainterFlags)
2638Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::SearchFlags)
2639Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Document::RenderHints)
2640Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PDFConverter::PDFOptions)
2641Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PSConverter::PSOptions)
2642
2643#endif
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:204
Base converter.
Definition poppler-qt5.h:2022
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:1176
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:1198
@ TwoPageRight
Display the pages two at a time, with odd-numbered pages on the right.
Definition poppler-qt5.h:1205
@ TwoPageLeft
Display the pages two at a time, with odd-numbered pages on the left.
Definition poppler-qt5.h:1204
@ TwoColumnLeft
Display the pages in two columns, with odd-numbered pages on the left.
Definition poppler-qt5.h:1202
@ SinglePage
Display a single page.
Definition poppler-qt5.h:1200
@ NoLayout
Layout not specified.
Definition poppler-qt5.h:1199
@ TwoColumnRight
Display the pages in two columns, with odd-numbered pages on the right.
Definition poppler-qt5.h:1203
@ OneColumn
Display a single column of pages.
Definition poppler-qt5.h:1201
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:1214
@ ArthurBackend
Definition poppler-qt5.h:1216
@ SplashBackend
Splash backend.
Definition poppler-qt5.h:1215
@ QPainterBackend
Definition poppler-qt5.h:1217
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:1185
@ UseOutlines
Document outline visible.
Definition poppler-qt5.h:1187
@ UseAttach
Attachments panel visible.
Definition poppler-qt5.h:1191
@ UseNone
No mode - neither document outline nor thumbnail images are visible.
Definition poppler-qt5.h:1186
@ UseThumbs
Thumbnail images visible.
Definition poppler-qt5.h:1188
@ FullScreen
Fullscreen mode (no menubar, windows controls etc).
Definition poppler-qt5.h:1189
@ UseOC
Optional content group panel visible.
Definition poppler-qt5.h:1190
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:1226
@ IgnorePaperColor
Do not compose with the paper color.
Definition poppler-qt5.h:1234
@ TextHinting
Hinting for text.
Definition poppler-qt5.h:1229
@ ThinLineShape
Enhance thin lines shape. Wins over ThinLineSolid.
Definition poppler-qt5.h:1233
@ HideAnnotations
Do not render annotations.
Definition poppler-qt5.h:1235
@ TextSlightHinting
Lighter hinting for text when combined with TextHinting.
Definition poppler-qt5.h:1230
@ OverprintPreview
Overprint preview.
Definition poppler-qt5.h:1231
@ TextAntialiasing
Antialiasing for text.
Definition poppler-qt5.h:1228
@ Antialiasing
Antialiasing for graphics.
Definition poppler-qt5.h:1227
@ ThinLineSolid
Enhance thin lines solid.
Definition poppler-qt5.h:1232
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:1929
@ CloseDocument
Performed before closing the document.
Definition poppler-qt5.h:1930
@ PrintDocumentStart
Performed before printing the document.
Definition poppler-qt5.h:1933
@ PrintDocumentFinish
Performed after printing the document.
Definition poppler-qt5.h:1934
@ SaveDocumentFinish
Performed after saving the document.
Definition poppler-qt5.h:1932
@ SaveDocumentStart
Performed before saving the document.
Definition poppler-qt5.h:1931
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:1245
@ AcroForm
AcroForm.
Definition poppler-qt5.h:1247
@ XfaForm
Adobe XML Forms Architecture (XFA), currently unsupported.
Definition poppler-qt5.h:1248
@ NoForm
Document doesn't contain forms.
Definition poppler-qt5.h:1246
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:207
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:215
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:333
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:848
The base class representing a form field.
Definition poppler-form.h:94
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:2569
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:2577
@ PlayPalindrome
Play forward, then backward, then again foward and so on until stopped.
Definition poppler-qt5.h:2581
@ PlayRepeat
Play continuously until stopped.
Definition poppler-qt5.h:2580
@ PlayOnce
Play the movie once, closing the movie controls at the end.
Definition poppler-qt5.h:2578
@ PlayOpen
Like PlayOnce, but leaving the controls open.
Definition poppler-qt5.h:2579
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:2270
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:2230
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:2238
@ WithChanges
The changes done to the document are saved as well.
Definition poppler-qt5.h:2239
~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:2423
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-qt5.h:2425
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-qt5.h:2427
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-qt5.h:2428
@ UserCancelled
User cancelled the process.
Definition poppler-qt5.h:2430
@ GenericSigningError
Unclassified error.
Definition poppler-qt5.h:2426
@ BadPassphrase
User entered bad passphrase.
Definition poppler-qt5.h:2431
@ WriteFailed
Write failed (permissions, faulty disk, ...).
Definition poppler-qt5.h:2429
@ SigningSuccess
No error.
Definition poppler-qt5.h:2424
SigningResult lastSigningResult() const
The last signing result, mostly relevant if sign returns false.
Converts a PDF to PS.
Definition poppler-qt5.h:2090
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:2100
@ ForceOverprintPreview
Force rasterized overprint preview during conversion.
Definition poppler-qt5.h:2106
@ Printing
The PS is generated for printing purposes.
Definition poppler-qt5.h:2101
@ HideAnnotations
Don't print annotations.
Definition poppler-qt5.h:2105
@ PrintToEPS
Output EPS instead of PS.
Definition poppler-qt5.h:2104
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:579
QList< Link * > links() const
Gets the links of the page.
Orientation
Types of orientations that are possible.
Definition poppler-qt5.h:945
@ UpsideDown
Upside down orientation (portrait, with 180 degrees rotation).
Definition poppler-qt5.h:949
@ Seascape
Seascape orientation (portrait, with 270 degrees clockwise rotation).
Definition poppler-qt5.h:948
@ Landscape
Landscape orientation (portrait, with 90 degrees clockwise rotation ).
Definition poppler-qt5.h:946
@ Portrait
Normal portrait orientation.
Definition poppler-qt5.h:947
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:799
@ NoSearchFlags
since 0.63
Definition poppler-qt5.h:800
@ IgnoreCase
Case differences are ignored.
Definition poppler-qt5.h:801
@ WholeWords
Only whole words are matched.
Definition poppler-qt5.h:802
@ AcrossLines
Allows to match on text spanning from end of a line to the next line.
Definition poppler-qt5.h:806
@ IgnoreDiacritics
Diacritic differences (eg.
Definition poppler-qt5.h:803
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:780
@ PreviousResult
Find the previous result, moving "up the page".
Definition poppler-qt5.h:783
@ FromTop
Start sorting at the top of the document.
Definition poppler-qt5.h:781
@ NextResult
Find the next result, moving "down the page".
Definition poppler-qt5.h:782
PainterFlag
Additional flags for the renderToPainter method.
Definition poppler-qt5.h:507
@ NoPainterFlags
Definition poppler-qt5.h:508
@ DontSaveAndRestore
Do not save/restore the caller-owned painter.
Definition poppler-qt5.h:516
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:475
@ Rotate270
Rotate 270 degrees clockwise (90 degrees counterclockwise).
Definition poppler-qt5.h:479
@ Rotate90
Rotate 90 degrees clockwise.
Definition poppler-qt5.h:477
@ Rotate0
Do not rotate.
Definition poppler-qt5.h:476
@ Rotate180
Rotate 180 degrees.
Definition poppler-qt5.h:478
~Page()
Destructor.
Orientation orientation() const
The orientation of the page.
SearchMode
The type of search to perform.
Definition poppler-qt5.h:790
@ CaseSensitive
Case differences cause no match in searching.
Definition poppler-qt5.h:791
@ CaseInsensitive
Case differences are ignored in matching.
Definition poppler-qt5.h:792
TextLayout
How the text is going to be returned.
Definition poppler-qt5.h:496
@ ReadingOrder
The text is returned in reading order,.
Definition poppler-qt5.h:499
@ RawOrderLayout
The text is returned without any type of processing.
Definition poppler-qt5.h:498
@ PhysicalLayout
The text is layouted to resemble the real page layout.
Definition poppler-qt5.h:497
PageAction
The kinds of page actions.
Definition poppler-qt5.h:486
@ Closing
The action when a page is "closed".
Definition poppler-qt5.h:488
@ Opening
The action when a page is "opened".
Definition poppler-qt5.h:487
QSize pageSize() const
double duration() const
Returns the page duration.
void(*)(const QImage &, const QVariant &) RenderToImagePartialUpdateFunc
Partial Update renderToImage callback.
Definition poppler-qt5.h:569
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:640
Container class for a sound file in a PDF document.
Definition poppler-qt5.h:2493
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:2508
@ ALaw
A-law-encoded samples.
Definition poppler-qt5.h:2512
@ muLaw
mu-law-encoded samples
Definition poppler-qt5.h:2511
@ Signed
Twos-complement values.
Definition poppler-qt5.h:2510
@ Raw
Raw encoding, with unspecified or unsigned values in the range [ 0, 2^B - 1 ].
Definition poppler-qt5.h:2509
SoundType
The type of sound.
Definition poppler-qt5.h:2499
@ External
The real sound file is external.
Definition poppler-qt5.h:2500
@ Embedded
The sound is contained in the data.
Definition poppler-qt5.h:2501
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:150
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:101
bool isOverprintPreviewAvailable()
Whether the overprint preview functionality is available.
ErrorStringType
The various types of error strings.
Definition poppler-qt5.h:122
@ ErrorCodeString
The string should be treated like a error code.
Definition poppler-qt5.h:124
@ UserString
The string should be treated as an advanced error message that can be shown to user.
Definition poppler-qt5.h:126
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:1694
Combination of an error data and type of error string.
Definition poppler-qt5.h:135