Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to save website as image using Qt.
Forum Updated to NodeBB v4.3 + New Features

How to save website as image using Qt.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.0k Views 1 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.
  • S Offline
    S Offline
    Shidharth
    wrote on last edited by
    #1

    Hi All,

    How to save webpage to image using qt.

    Regards,
    Siddharth.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      A webpage is hard to save as an image as such.

      But you could use
      http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
      To take a picture of it.

      So you could open page in browser and take picture.

      Else you need to use webkit and print to pdf. for something like a picture.

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Shidharth
        wrote on last edited by
        #3

        Hi

        thanks for ur reply..
        using above technique can I get a full webpage?

        thanks
        Siddu..

        mrjjM 1 Reply Last reply
        0
        • S Shidharth

          Hi

          thanks for ur reply..
          using above technique can I get a full webpage?

          thanks
          Siddu..

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Shidharth

          well only if full page is shown on screen.

          Else you can use
          http://doc.qt.io/qt-5/qwebview.html#details
          and see if u can make it render to a pdf.

          Why you need web pages as an images ?

          S 1 Reply Last reply
          1
          • mrjjM mrjj

            @Shidharth

            well only if full page is shown on screen.

            Else you can use
            http://doc.qt.io/qt-5/qwebview.html#details
            and see if u can make it render to a pdf.

            Why you need web pages as an images ?

            S Offline
            S Offline
            Shidharth
            wrote on last edited by Shidharth
            #5

            @mrjj

            Thank for your quick reply.
            I have create small project to export to image(like export to pdf).

            Thanks,
            Siddu

            mrjjM 1 Reply Last reply
            1
            • S Shidharth

              @mrjj

              Thank for your quick reply.
              I have create small project to export to image(like export to pdf).

              Thanks,
              Siddu

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Shidharth
              Ok, then Qwebview and QPrinter
              QPrinter printer(QPrinter::HighResolution);
              printer.setOutputFormat(QPrinter::PdfFormat);
              Might work.

              S 1 Reply Last reply
              0
              • mrjjM mrjj

                @Shidharth
                Ok, then Qwebview and QPrinter
                QPrinter printer(QPrinter::HighResolution);
                printer.setOutputFormat(QPrinter::PdfFormat);
                Might work.

                S Offline
                S Offline
                Shidharth
                wrote on last edited by
                #7

                @mrjj

                Thank U so much!!!

                Regards,
                Siddu..

                1 Reply Last reply
                1

                • Login

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