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 convert PDF to Jpg?
Forum Updated to NodeBB v4.3 + New Features

How to convert PDF to Jpg?

Scheduled Pinned Locked Moved General and Desktop
10 Posts 6 Posters 4.6k Views 2 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.
  • B Offline
    B Offline
    blue_sky
    wrote on last edited by
    #1

    I ve done the reverse. by panting QPrinter Object with QImage..and saving it as Pdf.
    But dont understand how to how convert the reverse?
    Please share any codes/idea?

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

      Hi,

      You would need to use a library like poppler to read the PDF. You can only print to pdf with Qt

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        blue_sky
        wrote on last edited by
        #3

        so there is no codes to convert it.thanks in advance.
        [quote author="SGaist" date="1386797868"]Hi,

        You would need to use a library like poppler to read the PDF. You can only print to pdf with Qt[/quote]

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

          Pure Qt code without any external lib ? Not that I know of. However poppler has support for both Qt 4 and 5 so it might help

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

          1 Reply Last reply
          0
          • IamSumitI Offline
            IamSumitI Offline
            IamSumit
            wrote on last edited by
            #5

            Hello blu-sky..

            I have an idea ...if you can render pdf on QWidget one by one, then in order to convert this pdf you can create a snapshot of QWidget using pixmap.grabWidget();
            and save it to jpg format using pixmap.save() function..

            Hope it'll help you..

            Be Cute

            1 Reply Last reply
            0
            • raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              [quote author="IamSumit" date="1386918834"]
              I have an idea ...if you can render pdf on QWidget one by one, then in order to convert this pdf you can create a snapshot of QWidget using pixmap.grabWidget();[/quote]
              well, that was the question.
              If you can render a PDF to a QPaintDevice (like QWidget and QPixmap is anyway) why shouldn't you render it directly to a pixmap...

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • IamSumitI Offline
                IamSumitI Offline
                IamSumit
                wrote on last edited by
                #7

                Hello RW,
                yeah you are right...
                Thanxx..

                Be Cute

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  blue_sky
                  wrote on last edited by
                  #8

                  You are right.
                  [quote author="raven-worx" date="1386920943"][quote author="IamSumit" date="1386918834"]
                  I have an idea ...if you can render pdf on QWidget one by one, then in order to convert this pdf you can create a snapshot of QWidget using pixmap.grabWidget();[/quote]
                  well, that was the question.
                  If you can render a PDF to a QPaintDevice (like QWidget and QPixmap is anyway) why shouldn't you render it directly to a pixmap...

                  [/quote]

                  1 Reply Last reply
                  0
                  • new_userN Offline
                    new_userN Offline
                    new_user
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      aliaanderson
                      Banned
                      wrote on last edited by
                      #10
                      This post is deleted!
                      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