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 detect if PDF reader is installed
Forum Updated to NodeBB v4.3 + New Features

How to detect if PDF reader is installed

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.3k 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.
  • L Offline
    L Offline
    ljc123456gogo
    wrote on last edited by ljc123456gogo
    #1

    From my application, it can auto-open a PDF file. This is works fine as long as the user has a PDF reader installed on his PC. I'd like to detect if this is the case so I can show a warning message if it's not ("Please install PDF reader in order to read PDF files...). Does Qt provide a means to detect this?
    Thanks inadvance.

    Keep Hungery, Keep Foolish!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      ljc123456gogo
      wrote on last edited by ljc123456gogo
      #2

      I have an idea which is dectect the installed software in the computer first, then search the pdf reader name.
      But I don't know whether Qt have the funtion to dectect the installed software.

      Keep Hungery, Keep Foolish!

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

        Hi,

        No it doesn't but AFAIK, most OSes shows this kind of dialog when trying to open a file of unsupported format.

        How are you opening your PDF ?

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

        L 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          No it doesn't but AFAIK, most OSes shows this kind of dialog when trying to open a file of unsupported format.

          How are you opening your PDF ?

          L Offline
          L Offline
          ljc123456gogo
          wrote on last edited by
          #4

          @SGaist
          I use the QWebview to load the path of a PDF file, beacuse Adobe Reader could open PDF in browser.

          Keep Hungery, Keep Foolish!

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

            Then provide it with a PDF plugin like described here

            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

            • Login

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