diff options
Diffstat (limited to 'src/pdf/doc')
-rw-r--r-- | src/pdf/doc/about_credits.tmpl | 1 | ||||
-rw-r--r-- | src/pdf/doc/about_credits_entry.tmpl | 13 | ||||
-rw-r--r-- | src/pdf/doc/images/multipageviewer.png | bin | 0 -> 39637 bytes | |||
-rw-r--r-- | src/pdf/doc/images/pdfviewer.png | bin | 0 -> 264348 bytes | |||
-rw-r--r-- | src/pdf/doc/images/search-results.png | bin | 0 -> 19718 bytes | |||
-rw-r--r-- | src/pdf/doc/images/singlepageviewer.webp | bin | 0 -> 57680 bytes | |||
-rw-r--r-- | src/pdf/doc/images/wrapping-search-result.png | bin | 0 -> 39106 bytes | |||
-rw-r--r-- | src/pdf/doc/qtpdf.qdocconf | 29 | ||||
-rw-r--r-- | src/pdf/doc/snippets/multipageview.qml | 11 | ||||
-rw-r--r-- | src/pdf/doc/snippets/pdfpageview.qml | 12 | ||||
-rw-r--r-- | src/pdf/doc/snippets/qtpdf-build.cmake | 4 | ||||
-rw-r--r-- | src/pdf/doc/snippets/qtpdf_build_snippet.qdoc | 33 | ||||
-rw-r--r-- | src/pdf/doc/src/qtpdf-examples.qdoc | 29 | ||||
-rw-r--r-- | src/pdf/doc/src/qtpdf-index.qdoc | 82 | ||||
-rw-r--r-- | src/pdf/doc/src/qtpdf-licensing.qdoc | 18 | ||||
-rw-r--r-- | src/pdf/doc/src/qtpdf-module.qdoc | 33 | ||||
-rw-r--r-- | src/pdf/doc/src/qtpdf-platformnotes.qdoc | 11 |
17 files changed, 136 insertions, 140 deletions
diff --git a/src/pdf/doc/about_credits.tmpl b/src/pdf/doc/about_credits.tmpl new file mode 100644 index 000000000..57fae9e78 --- /dev/null +++ b/src/pdf/doc/about_credits.tmpl @@ -0,0 +1 @@ +{{entries}} diff --git a/src/pdf/doc/about_credits_entry.tmpl b/src/pdf/doc/about_credits_entry.tmpl new file mode 100644 index 000000000..294198709 --- /dev/null +++ b/src/pdf/doc/about_credits_entry.tmpl @@ -0,0 +1,13 @@ +/*! +\page qtpdf-3rdparty-{{name-sanitized}}.html +\attribution +\ingroup qtpdf-licensing +\brief {{license-type}} +\title {{name}} + +\l{{{url}}}{Project Homepage} + +\badcode +{{license}} +\endcode +*/ diff --git a/src/pdf/doc/images/multipageviewer.png b/src/pdf/doc/images/multipageviewer.png Binary files differnew file mode 100644 index 000000000..2f0bb62a2 --- /dev/null +++ b/src/pdf/doc/images/multipageviewer.png diff --git a/src/pdf/doc/images/pdfviewer.png b/src/pdf/doc/images/pdfviewer.png Binary files differnew file mode 100644 index 000000000..ac8a31ac0 --- /dev/null +++ b/src/pdf/doc/images/pdfviewer.png diff --git a/src/pdf/doc/images/search-results.png b/src/pdf/doc/images/search-results.png Binary files differnew file mode 100644 index 000000000..91ee53b83 --- /dev/null +++ b/src/pdf/doc/images/search-results.png diff --git a/src/pdf/doc/images/singlepageviewer.webp b/src/pdf/doc/images/singlepageviewer.webp Binary files differnew file mode 100644 index 000000000..e429cb818 --- /dev/null +++ b/src/pdf/doc/images/singlepageviewer.webp diff --git a/src/pdf/doc/images/wrapping-search-result.png b/src/pdf/doc/images/wrapping-search-result.png Binary files differnew file mode 100644 index 000000000..108ec0444 --- /dev/null +++ b/src/pdf/doc/images/wrapping-search-result.png diff --git a/src/pdf/doc/qtpdf.qdocconf b/src/pdf/doc/qtpdf.qdocconf index 7a77105c9..d0340fe83 100644 --- a/src/pdf/doc/qtpdf.qdocconf +++ b/src/pdf/doc/qtpdf.qdocconf @@ -1,4 +1,5 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) +include($QT_INSTALL_DOCS/config/exampleurl-qtwebengine.qdocconf) project = QtPdf description = Qt Pdf Reference Documentation @@ -12,10 +13,6 @@ qhp.QtPdf.virtualFolder = qtpdf qhp.QtPdf.indexTitle = Qt PDF qhp.QtPdf.indexRoot = -qhp.QtPdf.filterAttributes = qtpdf $QT_VERSION qtrefdoc -qhp.QtPdf.customFilters.Qt.name = QtPdf $QT_VERSION -qhp.QtPdf.customFilters.Qt.filterAttributes = qtpdf $QT_VERSION - qhp.QtPdf.subprojects = classes qmltypes examples qhp.QtPdf.subprojects.classes.title = C++ Classes @@ -33,6 +30,8 @@ qhp.QtPdf.subprojects.examples.indexTitle = Qt PDF Examples qhp.QtPdf.subprojects.examples.selectors = doc:example qhp.QtPdf.subprojects.examples.sortPages = true +manifestmeta.highlighted.names += "QtPdf/PDF Multipage Viewer Example" + depends += qtcore \ qtwidgets \ qtgui \ @@ -40,19 +39,29 @@ depends += qtcore \ qmake \ qtdesigner \ qtquick \ - qtcmake + qtquickcontrols \ + qtcmake \ + qtsvg -headerdirs += ../api \ - ../quick +headerdirs += ../ \ + ../../pdfwidgets -sourcedirs += .. \ - ../quick +sourcedirs += ../ \ + ../../pdfquick \ + ../../pdfwidgets exampledirs += ../../../examples/pdfwidgets \ + ../../../examples/pdf \ snippets/ +# add a generic thumbnail for an example that has no \image in its doc +manifestmeta.thumbnail.names = "QtPdf/PDF Viewer Example" + imagedirs += images navigation.landingpage = "Qt PDF" navigation.cppclassespage = "Qt PDF C++ Classes" -navigation.qmltypespage = "Qt WebEngine QML Types" +navigation.qmltypespage = "Qt Quick PDF QML Types" + +# Enforce zero documentation warnings +warninglimit = 0 diff --git a/src/pdf/doc/snippets/multipageview.qml b/src/pdf/doc/snippets/multipageview.qml new file mode 100644 index 000000000..113444165 --- /dev/null +++ b/src/pdf/doc/snippets/multipageview.qml @@ -0,0 +1,11 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [0] +import QtQuick +import QtQuick.Pdf + +PdfMultiPageView { + document: PdfDocument { source: "my.pdf" } +} +//! [0] diff --git a/src/pdf/doc/snippets/pdfpageview.qml b/src/pdf/doc/snippets/pdfpageview.qml new file mode 100644 index 000000000..5e233961a --- /dev/null +++ b/src/pdf/doc/snippets/pdfpageview.qml @@ -0,0 +1,12 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [0] +import QtQuick +import QtQuick.Pdf + +PdfPageView { + document: PdfDocument { source: "my.pdf" } +} +//! [0] + diff --git a/src/pdf/doc/snippets/qtpdf-build.cmake b/src/pdf/doc/snippets/qtpdf-build.cmake index d46b9c3ee..b4372d411 100644 --- a/src/pdf/doc/snippets/qtpdf-build.cmake +++ b/src/pdf/doc/snippets/qtpdf-build.cmake @@ -1,2 +1,2 @@ -find_package(Qt5 COMPONENTS Pdf REQUIRED) -target_link_libraries(mytarget Qt5::Pdf) +find_package(Qt6 REQUIRED COMPONENTS Pdf) +target_link_libraries(mytarget Qt6::Pdf) diff --git a/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc b/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc index 25593b1ee..7d30ccdfd 100644 --- a/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc +++ b/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc @@ -1,35 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only //! [0] QT += pdf //! [0] - - -//! [1] -#include <QtPdf> -//! [1] diff --git a/src/pdf/doc/src/qtpdf-examples.qdoc b/src/pdf/doc/src/qtpdf-examples.qdoc index 9daa0e7f8..02dc23dc2 100644 --- a/src/pdf/doc/src/qtpdf-examples.qdoc +++ b/src/pdf/doc/src/qtpdf-examples.qdoc @@ -1,33 +1,8 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \group qtpdf-examples - \ingroup all-examples \title Qt PDF Examples \brief Using the classes and types in the Qt PDF module. diff --git a/src/pdf/doc/src/qtpdf-index.qdoc b/src/pdf/doc/src/qtpdf-index.qdoc index b32787eb5..b72619fbf 100644 --- a/src/pdf/doc/src/qtpdf-index.qdoc +++ b/src/pdf/doc/src/qtpdf-index.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtpdf-index.html @@ -36,8 +12,34 @@ and renders pages from it according to the options provided by the \l QPdfDocumentRenderOptions class. The \l QPdfPageRenderer class manages a queue that collects all render requests. The - \l QPdfPageNavigation class handles the navigation through a - PDF document. + \l QPdfPageNavigator class handles the navigation through a + PDF document. The \l QPdfSearchModel class searches for a string + and holds the search results. The QPdfBookmarkModel class holds the + table of contents, if present. The QPdfLinkModel holds information + about hyperlinks on a page. The \l QPdfView widget is a complete + PDF viewer, and the \l {PDF Viewer Widget Example} shows how to use it. + + For Qt Quick applications, three kinds of full-featured viewer + components are provided. \l PdfMultiPageView should be your + first choice for the most common user experience: flicking + through the pages in the entire document. + \l PdfScrollablePageView shows one page at a time, with scrolling; + and \l PdfPageView shows one full page at a time, without scrolling. + + The full-featured viewer components are composed of lower-level + QML components that can be used separately if you need to write a + more customized PDF viewing application: \l PdfDocument, + \l PdfPageImage, \l PdfPageNavigator, \l PdfSelection, + \l PdfSearchModel, \l PdfLinkModel, and \l PdfBookmarkModel. + + If you only need to render page images, without features such as + text selection, search and navigation, this module includes a + \l QImageIOHandler plugin that treats PDF as a scalable + \l {Qt Image Formats}{image format}, similar to \l {Qt SVG}{SVG}. + You can simply use \l Image, and set the + \l {Image::currentFrame}{currentFrame} property to the page index + that you wish to display. If the PDF file does not render its own + background, the image has a transparent background. \include module-use.qdocinc using qt module \quotefile qtpdf-build.cmake @@ -46,21 +48,10 @@ \section2 Building with qmake - To include the definitions of the module's classes, use the - following directive: - - \snippet qtpdf_build_snippet.qdoc 1 - To link against the module, add this line to your qmake project file: \snippet qtpdf_build_snippet.qdoc 0 - \section1 Articles and Guides - - \list - \li \l{Qt PDF Overview} - \endlist - \section1 Examples \list @@ -73,4 +64,17 @@ \li \l{Qt PDF C++ Classes} \li \l{Qt Quick PDF QML Types} \endlist + + \section1 Articles and Guides + \list + \li {Qt PDF Platform Notes} {Platform Notes} + \endlist + + \section1 Licenses and Attributions + + Qt PDF is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under the + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt PDF Licensing} for further details about this module. */ diff --git a/src/pdf/doc/src/qtpdf-licensing.qdoc b/src/pdf/doc/src/qtpdf-licensing.qdoc new file mode 100644 index 000000000..190ee8331 --- /dev/null +++ b/src/pdf/doc/src/qtpdf-licensing.qdoc @@ -0,0 +1,18 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \group qtpdf-licensing + \title Qt PDF Licensing + + Qt PDF is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under the + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + + The module includes a snapshot of PDFium. As such, users need to respect + the licenses of PDFium and third-party code included in it. + + Third party licenses included in the sources are: +*/ diff --git a/src/pdf/doc/src/qtpdf-module.qdoc b/src/pdf/doc/src/qtpdf-module.qdoc index 4170deb38..e2ca8e4ce 100644 --- a/src/pdf/doc/src/qtpdf-module.qdoc +++ b/src/pdf/doc/src/qtpdf-module.qdoc @@ -1,29 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! @@ -37,11 +13,6 @@ The Qt PDF module contains classes and functions for rendering PDF documents. - To include the definitions of the module's classes, use the - following directive: - - \snippet qtpdf_build_snippet.qdoc 1 - \if !defined(qtforpython) To link against the module, add this line to your qmake project file: diff --git a/src/pdf/doc/src/qtpdf-platformnotes.qdoc b/src/pdf/doc/src/qtpdf-platformnotes.qdoc new file mode 100644 index 000000000..f50be120d --- /dev/null +++ b/src/pdf/doc/src/qtpdf-platformnotes.qdoc @@ -0,0 +1,11 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page qtpdf-platformnotes.html + \title Qt PDF Platform Notes + + Building Qt PDF for Android is currently + \l{https://bugreports.qt.io/browse/QTBUG-83459} {not supported} on Windows host platforms. +*/ + |