7 Replies Latest reply on Jun 13, 2017 12:28 PM by gofmp15

    Open a PDF file In GO 16

    gofmp15

      This works on PC:

      set variable $pdfname to "MyPDFfile.pdf"

      Set variable $URL to "file://" get(desktoppath) & $pdfname

      open url ( $URL)

       

      It doesn't work in IOS. I can see the saved PDF in Launch Center in GO 16.

       

      Options for IOS

      Set variable $URL to "file:///" & $pdfname

      or

      Set variable $URL to "file://" & $pdfname

      or

      Set variable $URL to "file:/" & $pdfname

      or

      Set variable $URL to "file:" & $pdfname

       

      Shouldn't be difficult to open a PDF that was created and saved using GO, right?

        • 1. Re: Open a PDF file In GO 16
          RickWhitelaw

          On iOS the "desktop" is the launch centre.

          • 2. Re: Open a PDF file In GO 16
            beverly

            This should be the default of

            Get ( DocumentsPath )

            However, with FMGo, you should not need to specify that, try:

            $URL = "file:// & $pdfname

            (untested and unverified...)

            Beverly

            • 3. Re: Open a PDF file In GO 16
              gofmp15

              My post shows I tried:

               

              Options for IOS

              Set variable $URL to "file:///" & $pdfname

              or

              Set variable $URL to "file://" & $pdfname

              or

              Set variable $URL to "file:/" & $pdfname

              or

              Set variable $URL to "file:" & $pdfname

               

               

               

              The only option seems to be to open the Launch thingy and tap on the PDF file that was saved.

               

              What's weird is that I can easily create the pdf and email it using a script in IOS but I can't open it in IOS. In Windows I can create the pdf and open it but not mail it since I don't have Outlook set up which freezes FileMaker.

              • 4. Re: Open a PDF file In GO 16
                skywillmott

                If the PDF has previously been saved into the FMGo 'documents' area, then you can use:

                 

                Set Variable $URL to "file://" & Get(DocumentsPath) & "myPDF.pdf"

                Open URL [$URL]

                 

                Alternatively you can choose to open the PDF immediately after it is created by using the 'Automatically open file' option when using the 'Save Records as PDF' script step. You might want to consider saving it to 'TemporaryPath' so as not to clutter up your FMGo 'documents' area.

                 

                Or, if you have the PDF saved in a container field, you can for example, export the container to the 'TemporaryPath', and again use the 'Automatically open file' option...

                 

                In fact, you could use the 'Save Records as PDF option to save it to TemporaryPath, then insert it into a container field using 'Insert from URL' script step for later viewing using the technique suggested above.

                 

                The advantage that I can see of using 'Open file automatically' is that you get the standard 'share sheet' to then email the PDF or open in other apps etc... The Open URL option to open the PDF does not show the share options as far as I can see...

                • 5. Re: Open a PDF file In GO 16
                  rgordon

                  If you want to open the PDF at creation, there is a setting in the PDF Specify Output File to Automatically open the PDF.  Another option to try is insert the PDF into a global container field, then export the field contents  and use the automatically open file option.

                  • 6. Re: Open a PDF file In GO 16
                    schamblee

                    There is not a Get(DesktopPath) for ios Devices, there is a Get(DocumentsPath) or Get(TemporaryPath).  See skywillmott post for the correct syntax.

                    1 of 1 people found this helpful
                    • 7. Re: Open a PDF file In GO 16
                      gofmp15

                      Finally. The correct answer. IOS uses Get(documentspath) rather than Get(desktoppath).

                       

                      Oddly, I had used this months before but forgotten it.