PdfDocument QML Type

A representation of a PDF document. 更多...

导入语句: import QtQuick.Pdf 5.15
Since: Qt 5.15

特性

信号

方法

详细描述

PdfDocument provides access to PDF document meta-information. It is not necessary for rendering, as it is enough to use an 图像 with source set to the URL of the PDF.

特性文档编制

author : string

This property holds the name of the person who created the document.


creationDate : string

This property holds the date and time the document was created.


creator : string

If the document was converted to PDF from another format, this property holds the name of the software that created the original document.


error : string

This property holds a translated string representation of the current error, if any.

另请参阅 status .


keywords : string

This property holds the keywords associated with the document.


maxPageHeight : real

This property holds the height of the tallest page in the document, in points.


maxPageWidth : real

This property holds the width of the widest page in the document, in points.


modificationDate : string

This property holds the date and time the document was most recently modified.


pageCount : int

This property holds the number of pages the PDF contains.


password : bool

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.


producer : string

If the document was converted to PDF from another format, this property holds the name of the software that converted it to PDF.


source : url

This property holds a URL pointing to the PDF file to be loaded.

注意: At this time, only local filesystem URLs are supported.


status : enum

This property tells the current status of the document. The possible values are:

常量 描述
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 加载后的状态,若加载失败。

subject : string

This property holds the subject of the document.


title : string

This property holds the document's title. A typical viewer UI can bind this to the Window.title 特性。


信号文档编制

passwordRequired ()

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.

注意: 相应处理程序是 onPasswordRequired .


方法文档编制

size pagePointSize ( int page )

Returns the size of the given page in points.