Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtpdf-index.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2019 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtpdf-index.html
6
\title Qt PDF
7
8
\brief Renders pages from PDF documents.
9
10
The Qt PDF module contains classes and functions for rendering
11
PDF documents in a Qt application. Qt PDF uses
12
\l{https://pdfium.googlesource.com/pdfium/}{PDFium}
13
to parse and render PDF documents.
14
15
The \l QPdfDocument class loads a PDF document
16
and renders pages from it according to the options provided by
17
the \l QPdfDocumentRenderOptions class. The \l QPdfPageRenderer
18
class manages a queue that collects all render requests. The
19
\l QPdfPageNavigator class handles the navigation through a
20
PDF document. The \l QPdfSearchModel class searches for a string
21
and holds the search results. The QPdfBookmarkModel class holds the
22
table of contents, if present. The QPdfLinkModel holds information
23
about hyperlinks on a page. The \l QPdfView widget is a complete
24
PDF viewer, and the \l {PDF Viewer Widget Example} shows how to use it.
25
26
For Qt Quick applications, three kinds of full-featured viewer
27
components are provided. \l PdfMultiPageView should be your
28
first choice for the most common user experience: flicking
29
through the pages in the entire document.
30
\l PdfScrollablePageView shows one page at a time, with scrolling;
31
and \l PdfPageView shows one full page at a time, without scrolling.
32
33
The full-featured viewer components are composed of lower-level
34
QML components that can be used separately if you need to write a
35
more customized PDF viewing application: \l PdfDocument,
36
\l PdfPageImage, \l PdfPageNavigator, \l PdfSelection,
37
\l PdfSearchModel, \l PdfLinkModel, and \l PdfBookmarkModel.
38
39
If you only need to render page images, without features such as
40
text selection, search and navigation, this module includes a
41
\l QImageIOHandler plugin that treats PDF as a scalable
42
\l {Qt Image Formats}{image format}, similar to \l {Qt SVG}{SVG}.
43
You can simply use \l Image, and set the
44
\l {Image::currentFrame}{currentFrame} property to the page index
45
that you wish to display. If the PDF file does not render its own
46
background, the image has a transparent background.
47
48
\include module-use.qdocinc using qt module
49
\quotefile qtpdf-build.cmake
50
51
See also the \l{Build with CMake} overview.
52
53
\section2 Building with qmake
54
55
To link against the module, add this line to your qmake project file:
56
57
\snippet qtpdf_build_snippet.qdoc 0
58
59
\section1 Examples
60
61
\list
62
\li \l{Qt PDF Examples}
63
\endlist
64
65
\section1 API Reference
66
67
\list
68
\li \l{Qt PDF C++ Classes}
69
\li \l{Qt Quick PDF QML Types}
70
\endlist
71
72
\section1 Articles and Guides
73
\list
74
\li \l{Qt PDF Platform Notes} {Platform Notes}
75
\endlist
76
77
\section1 Licenses and Attributions
78
79
Qt PDF is available under commercial licenses from \l{The Qt Company}.
80
In addition, it is available under the
81
\l{GNU Lesser General Public License, version 3}, or
82
the \l{GNU General Public License, version 2}.
83
See \l{Qt PDF Licensing} for further details about this module.
84
*/
qtwebengine
src
pdf
doc
src
qtpdf-index.qdoc
Generated on
for Qt by
1.16.1