QtPDF Build Instructions

From Qt Wiki
Revision as of 13:24, 28 May 2020 by Shawnrutledge (talk | contribs) (Created page with "QtPDF is provided via [https://marketplace.qt.io/products/qtpdf Marketplace] for convenience; but you can also build it yourself from the qtwebengine repo. <code> $ git clone...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

QtPDF is provided via Marketplace for convenience; but you can also build it yourself from the qtwebengine repo.

$ 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.