Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Open a PDF file from a QT app for IOS

Open a PDF file from a QT app for IOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
ios pdf openurl
7 Posts 3 Posters 3.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.
  • N Offline
    N Offline
    NGV1
    wrote on last edited by
    #1

    Hi,

    I try to open a file PDF (with acrobat reader) from a button in QT app.

    My code :

    ...
    FichierMenu = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/File1.pdf";
    QDesktopServices::openUrl(QUrl::fromLocalFile(FichierMenu));
    ...

    The same code for android app is OK, but it does not work in IOS.

    The message in debug is :

    This plugin does not support QPlatformServices::openDocument() for 'file:///var/mobile/Containers/Data/Application/02D20ECB-C523-4A45-828B-BF0513D37BCF/Documents/File1.pdf'.

    What is the problem ?
    And what is the solution ?

    Thanks

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

      Hi,

      What version of Qt are you using ?

      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
      • N Offline
        N Offline
        NGV1
        wrote on last edited by
        #3

        Hi,

        It's QT Creator 3.5.1
        QT 5.5.1
        Clang 6.1 Apple 64 bits

        X Code version 7.2

        Thanks

        1 Reply Last reply
        0
        • N NGV1

          Hi,

          I try to open a file PDF (with acrobat reader) from a button in QT app.

          My code :

          ...
          FichierMenu = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/File1.pdf";
          QDesktopServices::openUrl(QUrl::fromLocalFile(FichierMenu));
          ...

          The same code for android app is OK, but it does not work in IOS.

          The message in debug is :

          This plugin does not support QPlatformServices::openDocument() for 'file:///var/mobile/Containers/Data/Application/02D20ECB-C523-4A45-828B-BF0513D37BCF/Documents/File1.pdf'.

          What is the problem ?
          And what is the solution ?

          Thanks

          M Offline
          M Offline
          Monasys
          wrote on last edited by
          #4

          @NGV1 Hi
          You can use vfr from Julius Oklamcak .
          Make a Static Lib in Xcode (see here).
          And use this library in you Qt App .

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

            Looks like this feature has not been yet implemented for iOS.

            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
            • N Offline
              N Offline
              NGV1
              wrote on last edited by
              #6

              I saw on the web that use QML on iphone works to open a file in an external application.
              Can you confirm this ? I do not know QML and would not waste time to implement an ineffective solution.
              If you have other ideas, even wacky, tell me please.
              Thanks in advance.

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

                Sounds like Qt.openUrlExternally, right ?

                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