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