Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qt 5.x: How to render PDF from QByteArray to QPainter?

    General and Desktop
    2
    3
    2216
    Loading More Posts
    • 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
      shav last edited by

      Hi everyone!

      I have a problem with read PDF file. I've used google to find some solution of my problem and I found only some libraries for example "poppler":http://poppler.freedesktop.org. But I can't build this library for Mac OS X 10.8.4 (my application must works on MS Window, Linux and Mac OS X).

      So, the problem which I want to resolve looks like: I have a SQLite DB with BLOB field, it's saves the PDF's data. This DB storage as local not on the server. My application must read the datas from BLOB field of DB and show it in application thats all. I can't find any solution to resolve my problem. Is exist some way to render PDF from QByteArray to QPainter component? Thanks for the any help!

      P.S. I use Qt 5.1 RC1 with QtQuick Desktop Components. The PDF render will use the QtQuick plugin. So I glad to use any solutions for Qt+C++.
      P.S.S. Also I don't want to use third-party libraries because I need cross-platform application.

      Mac OS and iOS Developer

      1 Reply Last reply Reply Quote 0
      • D
        DerManu last edited by

        I'm afraid you'll have a huge pile of work to do if you want to render a PDF without third-party libraries. The PDF definition is very complex and making a renderer from scratch is a multi-year, full-time job.

        My suggestion is to get poppler to compile for the targets you need. If you have difficulties for a specific platform, try contacting the poppler community (forum, mailing list,...)

        1 Reply Last reply Reply Quote 0
        • S
          shav last edited by

          Thank for the reply! I will try to compile the poppler. If you find the some way to resolve this problem let me known.

          Mac OS and iOS Developer

          1 Reply Last reply Reply Quote 0
          • First post
            Last post