Qt Forum

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

    Why is it possible to write pdf files but not to read it?

    General and Desktop
    2
    3
    2805
    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.
    • V
      vinb last edited by

      Hi all,
      I'm having the question you see in the title.
      I don't understand why its easy to write a pdf file, but that you have to use 3rd party libs to read it.
      Can someone please explain this to me?

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        Mostly this is due to the PDF format. It is pretty simple to write, but getting useful information back out is much harder. It is intended to produce exact representation of pages, so it basically (I am simplifying a lot!) "put the letter 'a' at position x and y and make sure it is w units wide and h units high, using font f". So it is really hard to turn the contents of a PDFs back into meaningful objects like text.

        Plus printing is way more common than parsing PDF contents, so it makes more sense to have the first in a general purpose library like Qt.

        1 Reply Last reply Reply Quote 0
        • V
          vinb last edited by

          Hi Tobias Hunger,

          Thanks for your reply!
          Then i will comfort me with QProcess and lp at the moment.

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