Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPdfDocument Class Reference

The QPdfDocument class loads a PDF document and renders pages from it. More...

#include <qpdfdocument.h>

+ Inheritance diagram for QPdfDocument:
+ Collaboration diagram for QPdfDocument:

Public Types

enum class  Status {
  Null , Loading , Ready , Unloading ,
  Error
}
 This enum describes the current status of the document. More...
 
enum class  Error {
  None , Unknown , DataNotYetAvailable , FileNotFound ,
  InvalidFileFormat , IncorrectPassword , UnsupportedSecurityScheme
}
 This enum describes the error while attempting the last operation on the document. More...
 
enum class  MetaDataField {
  Title , Subject , Author , Keywords ,
  Producer , Creator , CreationDate , ModificationDate
}
 This enum describes the available fields of meta data. More...
 
enum class  PageModelRole { Label = Qt::UserRole , PointSize , NRoles }
 Roles in pageModel(). More...
 

Signals

void passwordChanged ()
 
void passwordRequired ()
 
void statusChanged (QPdfDocument::Status status)
 
void pageCountChanged (int pageCount)
 
void pageModelChanged ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QPdfDocument ()
 
 QPdfDocument (QObject *parent)
 Constructs a new document with parent object parent.
 
 ~QPdfDocument () override
 Destroys the document.
 
Error load (const QString &fileName)
 Loads the document contents from fileName.
 
Status status () const
 
void load (QIODevice *device)
 Loads the document contents from device.
 
void setPassword (const QString &password)
 
QString password () const
 
QVariant metaData (MetaDataField field) const
 Returns the meta data of the document for the given field.
 
Error error () const
 Returns the type of error if \l status is Error, or NoError if there is no error.
 
void close ()
 Closes the document.
 
int pageCount () const
 
Q_INVOKABLE QSizeF pagePointSize (int page) const
 Returns the size of page page in points (1/72 of an inch).
 
Q_INVOKABLE QString pageLabel (int page)
 Returns the page number to be used for display purposes.
 
Q_INVOKABLE int pageIndexForLabel (const QString &label)
 Returns the index of the page that has the label, or -1 if not found.
 
QAbstractListModelpageModel ()
 
QImage render (int page, QSize imageSize, QPdfDocumentRenderOptions options=QPdfDocumentRenderOptions())
 Renders the page into a QImage of size imageSize according to the provided renderOptions.
 
Q_INVOKABLE QPdfSelection getSelection (int page, QPointF start, QPointF end)
 Returns information about the text on the given page that can be found between the given start and end points, if any.
 
Q_INVOKABLE QPdfSelection getSelectionAtIndex (int page, int startIndex, int maxLength)
 Returns information about the text on the given page that can be found beginning at the given startIndex with at most maxLength characters.
 
Q_INVOKABLE QPdfSelection getAllText (int page)
 Returns all the text and its bounds on the given page.
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Properties

int pageCount
 This property holds the number of pages in the loaded document or 0 if no document is loaded.
 
QString password
 This property holds the document password.
 
Status status
 This property holds the current status of the document.
 
QAbstractListModelpageModel
 This property holds an instance of QAbstractListModel to provide page-specific metadata, containing one row for each page in the document.
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Friends

struct QPdfBookmarkModelPrivate
 
class QPdfFile
 
class QPdfLinkModelPrivate
 
class QPdfPageModel
 
class QPdfSearchModel
 
class QPdfSearchModelPrivate
 
class QQuickPdfSelection
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

The QPdfDocument class loads a PDF document and renders pages from it.

Since
5.10 \inmodule QtPdf

Definition at line 20 of file qpdfdocument.h.

Member Enumeration Documentation

◆ Error

enum class QPdfDocument::Error
strong

This enum describes the error while attempting the last operation on the document.

\value None No error occurred. \value Unknown Unknown type of error. \value DataNotYetAvailable The document is still loading, it's too early to attempt the operation. \value FileNotFound The file given to load() was not found. \value InvalidFileFormat The file given to load() is not a valid PDF file. \value IncorrectPassword The password given to setPassword() is not correct for this file. \value UnsupportedSecurityScheme QPdfDocument is not able to unlock this kind of PDF file.

See also
QPdfDocument::error()
Enumerator
None 
Unknown 
DataNotYetAvailable 
FileNotFound 
InvalidFileFormat 
IncorrectPassword 
UnsupportedSecurityScheme 

Definition at line 39 of file qpdfdocument.h.

◆ MetaDataField

enum class QPdfDocument::MetaDataField
strong

This enum describes the available fields of meta data.

\value Title The document's title as QString. \value Author The name of the person who created the document as QString. \value Subject The subject of the document as QString. \value Keywords Keywords associated with the document as QString. \value Creator If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted as QString. \value Producer If the document was converted to PDF from another format, the name of the conforming product that converted it to PDF as QString. \value CreationDate The date and time the document was created as QDateTime. \value ModificationDate The date and time the document was most recently modified as QDateTime.

See also
QPdfDocument::metaData()
Enumerator
Title 
Subject 
Author 
Keywords 
Producer 
Creator 
CreationDate 
ModificationDate 

Definition at line 50 of file qpdfdocument.h.

◆ PageModelRole

enum class QPdfDocument::PageModelRole
strong

Roles in pageModel().

\value Label The page number to be used for display purposes (QString). \value PointSize The page size in points (1/72 of an inch) (QSizeF). \omitvalue NRoles

Enumerator
Label 
PointSize 
NRoles 

Definition at line 62 of file qpdfdocument.h.

◆ Status

enum class QPdfDocument::Status
strong

This enum describes the current status of the document.

\value Null The initial status after the document has been created or after it has been closed. \value Loading The status after load() has been called and before the document is fully loaded. \value Ready The status when the document is fully loaded and its data can be accessed. \value Unloading The status after close() has been called on an open document. At this point the document is still valid and all its data can be accessed. \value Error The status after Loading, if loading has failed.

See also
QPdfDocument::status()
Enumerator
Null 
Loading 
Ready 
Unloading 
Error 

Definition at line 30 of file qpdfdocument.h.

Constructor & Destructor Documentation

◆ QPdfDocument() [1/2]

QPdfDocument::QPdfDocument ( )
inline

Definition at line 69 of file qpdfdocument.h.

◆ QPdfDocument() [2/2]

QPdfDocument::QPdfDocument ( QObject * parent)
explicit

Constructs a new document with parent object parent.

Definition at line 569 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::q.

◆ ~QPdfDocument()

QPdfDocument::~QPdfDocument ( )
override

Destroys the document.

Definition at line 579 of file qpdfdocument.cpp.

Member Function Documentation

◆ close()

void QPdfDocument::close ( )

Closes the document.

Definition at line 781 of file qpdfdocument.cpp.

References QByteArray::clear(), QPdfDocumentPrivate::clear(), QPdfDocumentPrivate::doc, emit, QByteArray::isEmpty(), Null, QPdfDocumentPrivate::password, passwordChanged(), QPdfDocumentPrivate::setStatus(), and Unloading.

Referenced by load(), and load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error()

QPdfDocument::Error QPdfDocument::error ( ) const

Returns the type of error if \l status is Error, or NoError if there is no error.

Definition at line 773 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::lastError.

Referenced by QQuickPdfDocument::classBegin(), and QQuickPdfDocument::error().

+ Here is the caller graph for this function:

◆ getAllText()

QPdfSelection QPdfDocument::getAllText ( int page)

Returns all the text and its bounds on the given page.

Definition at line 1078 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::doc, QPdfDocumentPrivate::getText(), i, lock, QPdfDocumentPrivate::mapPageToView(), page, qCDebug, rect, and text.

Referenced by QQuickPdfSelection::selectAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelection()

QPdfSelection QPdfDocument::getSelection ( int page,
QPointF start,
QPointF end )

Returns information about the text on the given page that can be found between the given start and end points, if any.

Definition at line 980 of file qpdfdocument.cpp.

References CharacterHitTolerance, QPdfDocumentPrivate::doc, QPdfDocumentPrivate::getCharBox(), QPdfDocumentPrivate::getText(), i, lock, QPdfDocumentPrivate::mapPageToView(), QPdfDocumentPrivate::mapViewToPage(), page, qAbs(), qCDebug, qSwap(), rect, and text.

+ Here is the call graph for this function:

◆ getSelectionAtIndex()

QPdfSelection QPdfDocument::getSelectionAtIndex ( int page,
int startIndex,
int maxLength )

Returns information about the text on the given page that can be found beginning at the given startIndex with at most maxLength characters.

Definition at line 1035 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::doc, QPdfDocumentPrivate::getCharPosition(), QPdfDocumentPrivate::getText(), i, lock, QPdfDocumentPrivate::mapPageToView(), page, pageCount, qCDebug, rect, QString::size(), and text.

+ Here is the call graph for this function:

◆ load() [1/2]

QPdfDocument::Error QPdfDocument::load ( const QString & fileName)

Loads the document contents from fileName.

Definition at line 586 of file qpdfdocument.cpp.

References close(), Error, fileName, FileNotFound, QPdfDocumentPrivate::lastError, QPdfDocumentPrivate::load(), Loading, qCDebug, QIODeviceBase::ReadOnly, and QPdfDocumentPrivate::setStatus().

Referenced by QQuickPdfDocument::classBegin(), and QQuickPdfDocument::setSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load() [2/2]

void QPdfDocument::load ( QIODevice * device)

Loads the document contents from device.

Definition at line 644 of file qpdfdocument.cpp.

References close(), device, QPdfDocumentPrivate::load(), Loading, and QPdfDocumentPrivate::setStatus().

+ Here is the call graph for this function:

◆ metaData()

QVariant QPdfDocument::metaData ( MetaDataField field) const

Returns the meta data of the document for the given field.

Definition at line 700 of file qpdfdocument.cpp.

References Author, QString::chop(), QByteArray::constData(), CreationDate, Creator, QPdfDocumentPrivate::doc, QString::endsWith(), QString::fromUtf16(), QString::insert(), Qt::ISODate, Keywords, lock, metaObject(), QString::mid(), ModificationDate, Producer, QByteArray(), QString::replace(), QString::startsWith(), Subject, text, and Title.

Referenced by QPdfIOHandler::option().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pageCount()

int QPdfDocument::pageCount ( ) const

Definition at line 804 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::pageCount.

◆ pageCountChanged

void QPdfDocument::pageCountChanged ( int pageCount)
signal

Referenced by QPdfSearchModel::setDocument().

+ Here is the caller graph for this function:

◆ pageIndexForLabel()

int QPdfDocument::pageIndexForLabel ( const QString & label)

Returns the index of the page that has the label, or -1 if not found.

See also
pageLabel()
Since
6.6

Definition at line 883 of file qpdfdocument.cpp.

References i, QPdfDocumentPrivate::pageCount, and pageLabel().

Referenced by QPdfPageSelectorSpinBox::valueFromText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pageLabel()

QString QPdfDocument::pageLabel ( int page)

Returns the page number to be used for display purposes.

For example, a document may have multiple sections with different numbering. Perhaps the preface uses roman numerals, the body starts on page 1, and the appendix starts at A1. Whenever a PDF viewer shows a page number, to avoid confusing the user it should be the same "number" as is printed on the corner of the page, rather than the zero-based page index that we use in APIs (assuming the document author has made the page labels match the printed numbers).

If the document does not have custom page numbering, this function returns {page + 1}.

See also
pageIndexForLabel()

Definition at line 865 of file qpdfdocument.cpp.

References QByteArray::data(), QPdfDocumentPrivate::doc, QString::fromUtf16(), lock, QString::number(), and page.

Referenced by pageIndexForLabel(), and QPdfPageSelectorSpinBox::textFromValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pageModel()

QAbstractListModel * QPdfDocument::pageModel ( )

◆ pageModelChanged

void QPdfDocument::pageModelChanged ( )
signal

◆ pagePointSize()

QSizeF QPdfDocument::pagePointSize ( int page) const

Returns the size of page page in points (1/72 of an inch).

Definition at line 812 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::checkPageComplete(), QPdfDocumentPrivate::doc, lock, and page.

Referenced by QPdfBookmarkModelPrivate::appendChildNode(), QPdfIOHandler::currentImageRect(), QPdfIOHandler::option(), QPdfIOHandler::read(), and render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ password()

QString QPdfDocument::password ( ) const

Definition at line 672 of file qpdfdocument.cpp.

References QString::fromUtf8(), and QPdfDocumentPrivate::password.

+ Here is the call graph for this function:

◆ passwordChanged

void QPdfDocument::passwordChanged ( )
signal

Referenced by QQuickPdfDocument::classBegin(), close(), and setPassword().

+ Here is the caller graph for this function:

◆ passwordRequired

void QPdfDocument::passwordRequired ( )
signal

Referenced by QQuickPdfDocument::classBegin().

+ Here is the caller graph for this function:

◆ render()

QImage QPdfDocument::render ( int page,
QSize imageSize,
QPdfDocumentRenderOptions renderOptions = QPdfDocumentRenderOptions() )

Renders the page into a QImage of size imageSize according to the provided renderOptions.

Returns the rendered page or an empty image in case of an error.

Note: If the imageSize does not match the aspect ratio of the page in the PDF document, the page is rendered scaled, so that it covers the complete imageSize.

Definition at line 902 of file qpdfdocument.cpp.

References QPdfDocumentRenderOptions::Annotations, QRect::bottom(), QPdfDocumentPrivate::checkPageComplete(), QPdfDocumentPrivate::doc, QPdfDocumentRenderOptions::ForceHalftone, QImage::Format_ARGB32, QPdfDocumentRenderOptions::Grayscale, QPdfDocumentRenderOptions::ImageAliased, QRect::left(), lock, QPdfDocumentRenderOptions::OptimizedForLcd, page, pagePointSize(), QPdfDocumentRenderOptions::PathAliased, Q_UNLIKELY, qCDebug, QRect::right(), QTimer::start(), QPdfDocumentRenderOptions::TextAliased, timer, QPdfDocumentPrivate::toFPDFRotation(), QRect::top(), and Qt::transparent.

Referenced by QPdfIOHandler::read(), and RenderWorker::requestPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPassword()

void QPdfDocument::setPassword ( const QString & password)

Definition at line 661 of file qpdfdocument.cpp.

References emit, password, QPdfDocumentPrivate::password, passwordChanged(), and QString::toUtf8().

+ Here is the call graph for this function:

◆ status()

QPdfDocument::Status QPdfDocument::status ( ) const

Definition at line 636 of file qpdfdocument.cpp.

References QPdfDocumentPrivate::status.

◆ statusChanged

void QPdfDocument::statusChanged ( QPdfDocument::Status status)
signal

Referenced by QPdfPageModel::QPdfPageModel(), QQuickPdfDocument::classBegin(), QPdfLinkModel::setDocument(), QPdfPageSelectorSpinBox::setDocument(), and QQuickPdfPageImage::setDocument().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QPdfBookmarkModelPrivate

friend struct QPdfBookmarkModelPrivate
friend

Definition at line 110 of file qpdfdocument.h.

◆ QPdfFile

friend class QPdfFile
friend

Definition at line 111 of file qpdfdocument.h.

◆ QPdfLinkModelPrivate

friend class QPdfLinkModelPrivate
friend

Definition at line 112 of file qpdfdocument.h.

◆ QPdfPageModel

friend class QPdfPageModel
friend

Definition at line 113 of file qpdfdocument.h.

◆ QPdfSearchModel

friend class QPdfSearchModel
friend

Definition at line 114 of file qpdfdocument.h.

◆ QPdfSearchModelPrivate

friend class QPdfSearchModelPrivate
friend

Definition at line 115 of file qpdfdocument.h.

◆ QQuickPdfSelection

friend class QQuickPdfSelection
friend

Definition at line 116 of file qpdfdocument.h.

Property Documentation

◆ pageCount

QPdfDocument::pageCount
read

This property holds the number of pages in the loaded document or 0 if no document is loaded.

Definition at line 24 of file qpdfdocument.h.

Referenced by QPdfSearchModelPrivate::clearResults(), getSelectionAtIndex(), QPdfIOHandler::imageCount(), QPdfSearchModelPrivate::pageAndIndexForResult(), QPdfIOHandler::read(), and QQuickPdfSearchModel::setCurrentPage().

◆ pageModel

QAbstractListModel * QPdfDocument::pageModel
read

This property holds an instance of QAbstractListModel to provide page-specific metadata, containing one row for each page in the document.

See also
QPdfDocument::PageModelRole

Definition at line 27 of file qpdfdocument.h.

◆ password

QPdfDocument::password
readwrite

This property holds the document password.

If the document is protected by a password, the user must provide it, and the application must set this property. Otherwise, it's not needed.

Definition at line 25 of file qpdfdocument.h.

Referenced by setPassword().

◆ status

QPdfDocument::status
read

This property holds the current status of the document.

Definition at line 26 of file qpdfdocument.h.

Referenced by QPdfBookmarkModelPrivate::rebuild(), QPdfPageRenderer::requestPage(), RenderWorker::requestPage(), and QQuickPdfPageImage::setDocument().


The documentation for this class was generated from the following files: