The Qt Company

Qt PDF

Qt PDF provides components for building PDF-viewing applications using QtQuick or Widgets.

  • PdfMultiPageView is a view that allows flicking between pages
  • PdfScrollablePageView is for viewing one page at a time
  • an image plugin for the PDF format; thus a Qt Quick Image item can use a PDF file as the source, while Image.currentFrame sets the page number
  • two complete QtQuick PDF viewer applications as examples: one using PdfMultiPageView and one using PdfScrollablePageView
  • one widget-based PDF viewer example
  • supported platforms: macOS, Linux, Windows, iOS
  • supported Qt versions: 5.15 or newer
  • Tech Preview status

import: QtQuick.Pdf 5.15

Qt PDF Documentation

See https://doc-snapshots.qt.io/qt5-5.15/qtpdf-index.html

screenshot of the multipage example

Qt PDF Building

$ git clone https://code.qt.io/qt/qtwebengine.git
$ cd qtwebengine
$ git submodule update --init --recursive
$ qmake . -- -no-build-qtwebengine-core
Info: creating stash file /home/myname/dev/qtwebengine/.qmake.stash 
Info: creating cache file /home/myname/dev/qtwebengine/.qmake.cache 

Running configuration tests... 
Checking for architecture supported... yes
... (many more tests)
Done running configuration tests. 

Configure summary: 

Qt WebEngine Build Tools:
  Use System Ninja ....................... yes
  Use System Gn .......................... no
  Jumbo Build Merge Limit ................ 8
  Developer build ........................ no
  QtWebEngine required system libraries:
    fontconfig ........................... yes
    dbus ................................. yes
    nss .................................. yes
    khr .................................. yes
    glibc ................................ yes
  QtWebEngine required system libraries for qpa-xcb:
    x11 .................................. yes
    libdrm ............................... yes
    xcomposite ........................... yes
    xcursor .............................. yes
    xi ................................... yes
    xtst ................................. yes
  Optional system libraries used:
    re2 .................................. yes
    icu .................................. no
    libwebp, libwebpmux and libwebpdemux . yes
    opus ................................. yes
    ffmpeg ............................... no
    libvpx ............................... yes
    snappy ............................... yes
    glib ................................. yes
    zlib ................................. yes
    minizip .............................. yes
    libevent ............................. yes
    jsoncpp .............................. yes
    protobuf ............................. yes
    libxml2 and libxslt .................. yes
    lcms2 ................................ yes
    png .................................. yes
    JPEG ................................. yes
    harfbuzz ............................. yes
    freetype ............................. yes
    xkbcommon ............................ yes
Qt PDF:
  Support V8 ............................. no
  Support XFA ............................ no
  Support XFA-BMP ........................ no
  Support XFA-GIF ........................ no
  Support XFA-PNG ........................ no
  Support XFA-TIFF ....................... no
Qt PDF Widgets:
  Support Qt PDF Widgets ................. yes

Note: QtWebEngine build is disabled by user.

Note: The following modules are not being compiled in this configuration:
    webenginecore
    webengine
    webenginewidgets

Qt is now configured for building. Just run 'make'. 
Once everything is built, you must run 'make install'. 
Qt will be installed into '/usr'.

$ make && make install

First it builds tools if necessary (gn and ninja), then QtPDF. (If you don't give the -no-build-qtwebengine-core argument, it will spend a lot of time building QtWebEngine before building QtPDF.)

Examples are in examples/pdf and examples/pdfwidgets.

Licensing

With your Marketplace purchase, you acquire this particular extension under the Qt Marketplace License Agreement.

Premium extensions by The Qt Company

This extension is provided by The Qt Company. Qt has an ocean of incredible community and partner-created extensions, add-ons, and modules. These components enhance the Qt design and development workflow of your project.

Support

Contact marketplace@qt.io if you have any questions regarding purchasing or any other questions.

Available in Qt Online Installer

After the purchase you can install the extension in your Qt Online Installer. The installer makes the integration of Qt extensions seamless to your development process.

$49.00

By clicking button above, I agree Marketplace user terms and conditions

Reviews
Details
Version:
1.0
Publisher:
The Qt Company
Contact:
marketplace@qt.io
Copyright:
The Qt Company
Licenses:
GPLv2
LGPLv3
Qt Commercial License
Qt Marketplace LA
Created at:
2020-05-04
Updated at:
2020-05-04
Platforms:
macOS
Windows
Linux
iOS
Qt versions:
5.15
Support:
Component support available for Qt commercial license users only
Bug URL:
https://bugreports.qt.io
Source repository:
https://code.qt.io/cgit/qt-labs/qtpdf.git/
Dependencies:
Quick
QuickControls2