Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Move to QWebEngine (Qt 5.6) to print a PDF file
Forum Updated to NodeBB v4.3 + New Features

Move to QWebEngine (Qt 5.6) to print a PDF file

Scheduled Pinned Locked Moved Unsolved Qt WebKit
7 Posts 4 Posters 3.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alain38
    wrote on last edited by
    #1

    Hi,
    I'm currently working to move a piece of code from Qt 4.8.4. to Qt 5.6. We selected Qt 5.6 because it is a long-term version. For our domain it is a critical requirement. And we are using Visual Studio 2013.

    This piece of code uses a QWebPage to create a complex HTML document with images inside. Then this document is printed in PDF format by using QWebPage->mainFrame()->print().

    As WebKit has disappeared from official delivery, I'm trying to move to QWebEngine. But QWebEnginePage does not seem to have print functionality in Qt 5.6.

    So, how to print a complex HTML document (with images) in PDF with Qt 5.6?

    Thanks for your help.

    1 Reply Last reply
    0
    • artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      Hi, have you tried QTextDocument?

      For more information please re-read.

      Kind Regards,
      Artur

      A 1 Reply Last reply
      0
      • artwawA artwaw

        Hi, have you tried QTextDocument?

        A Offline
        A Offline
        Alain38
        wrote on last edited by Alain38
        #3

        @artwaw Hi, I remember we had a lot of trouble with QTextDocument in 4.8.4. So I did several tries with 5.6. And we still have troubles, particularly with the CSS. SO iti is why we moved to WebPage that really gave good results in term of page format.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Just a quick recommandation, Qt 5.9 is the new LTS release so it might be well worth taking a shot at it. There's also @Konstantin-Tokarev QtWebKit reboot that might be of interest and could also simplify your life.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Just a quick recommandation, Qt 5.9 is the new LTS release so it might be well worth taking a shot at it. There's also @Konstantin-Tokarev QtWebKit reboot that might be of interest and could also simplify your life.

            A Offline
            A Offline
            Alain38
            wrote on last edited by
            #5

            @SGaist Hi, I'm just trying Qt5.9. The only thing is that we will have to move to a more recent Visual studio version. As it seems that QtWebEngine does not exist for Visual 2013. And I also have some troubles moving to QtWebEngine (I will write another post for this).

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The compiler depends on what the Chromium project supports.

              As stated before, the QtWebkit reboot might a solution.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              K 1 Reply Last reply
              0
              • SGaistS SGaist

                The compiler depends on what the Chromium project supports.

                As stated before, the QtWebkit reboot might a solution.

                K Offline
                K Offline
                Konstantin Tokarev
                wrote on last edited by
                #7

                @SGaist said in Move to QWebEngine (Qt 5.6) to print a PDF file:

                As stated before, the QtWebkit reboot might a solution.

                We don't support VS2013 in 5.212.x. The only solution is to use legacy QtWebKit provided with Qt 5.9 in source form

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved