PdfDocument QML Type
A representation of a PDF document. More...
Import Statement: | import QtQuick.Pdf 5.15 |
Since: | Qt 5.15 |
Properties
- author : string
- creationDate : string
- creator : string
- error : string
- keywords : string
- maxPageHeight : real
- maxPageWidth : real
- modificationDate : string
- pageCount : int
- password : bool
- producer : string
- source : url
- status : enum
- subject : string
- title : string
Signals
Methods
- size pagePointSize(int page)
Detailed Description
PdfDocument provides access to PDF document meta-information. It is not necessary for rendering, as it is enough to use an Image with source set to the URL of the PDF.
Property Documentation
If the document was converted to PDF from another format, this property holds the name of the software that created the original document.
This property holds a translated string representation of the current error, if any.
See also status.
This property holds the date and time the document was most recently modified.
This property holds the document password. If the passwordRequired() signal is emitted, the UI should prompt the user and then set this property so that document opening can continue.
If the document was converted to PDF from another format, this property holds the name of the software that converted it to PDF.
This property holds a URL pointing to the PDF file to be loaded.
Note: At this time, only local filesystem URLs are supported.
This property tells the current status of the document. The possible values are:
Constant | Description |
---|---|
PdfDocument.Null | The initial status after the document has been created or after it has been closed. |
PdfDocument.Loading | The status after load() has been called and before the document is fully loaded. |
PdfDocument.Ready | The status when the document is fully loaded and its data can be accessed. |
PdfDocument.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. |
PdfDocument.Error | The status after Loading, if loading has failed. |
This property holds the document's title. A typical viewer UI can bind this to the Window.title
property.
Signal Documentation
This signal is emitted when the PDF requires a password in order to open. The UI in a typical PDF viewer should prompt the user for the password and then set the password property when the user has provided it.
Note: The corresponding handler is onPasswordRequired
.
Method Documentation
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.