13 Replies Latest reply on Mar 22, 2016 3:15 PM by dinoeverett

    Can't open pdf on mac

    dinoeverett

      I have been having a very hard time trying to open a pdf that is stored opn an external non-filemaker server, since I need separate script steps for the PC and the mac...PC work easy multiple different ways, but mac never opens no matter what.......Basically the pdf's are all stored on an external server and I am breaking the script up into 2 sections ... 1 - to direct it to the folder where all of these pdf's are located, and 2 - each record has a field (Item Records::url) with the name of the specific pdf that is related only to that record.

       

      I receive the following error messages when I try to use the script....

      1 - The file "<unknown>" could not be found and is required to complete this operation.       

       

      then

       

      2 - The previous script step "send event" could not be completed because of an error. Do you wish to continue?

       

      when I hit continue it opens the folder where the pdf file exists.

       

       

      Here is my current script, can anyone find the errors? -

       

      1 - Set Variable [$server;

      Value: "file://fs02.cntv.usc.edu/Departments/Archives/USCDesktop/Notebooks"]

      2 - Set Variable [$file;

      Value: Item Records::url]

      3 - Set Variable {$path; Value: $server & $file]

      4 - If [Get(SystemPlatform)=1]

      5 - Set Variable [$path;

           Value: "smb://fs02.cntv.usc.edu/Departments/Archives/USCDesktop/Notebooks"]

      6 - Set Variable [$file;

           Value: Item Records::url]

      7 - Send Event ["aevt"; "odoc";

           "$path & $file"]

      8 - End if

      9 Open URL [No dialog; $path]

        • 1. Re: Can't open pdf on mac

          I get this type of error if I type in the path to the file myself rather than use the dialog to build the path.

           

          You might want to get a plug-in (like MBS) and see if the file path (and the file, of course) exists (or create your own external program accessible by GET OR POST):

           

          Monkeybread Software - MBS Filemaker Plugin: Files.FileExists

           

          HTH

           

          - m

          • 2. Re: Can't open pdf on mac
            dinoeverett

            Morkus

               no disrespect as I appreciate the help, but isn't filemaker an apple product. It seems weird I should have to acquire an entire other piece of software simply to open one of the most common and widely used file formats, especially since the program itself can turn an export into a pdf...I really feel like there must be a simple error in my script that is preventing this...

            • 3. Re: Can't open pdf on mac

              Far be it for me to push plug-ins on anyone; I'm actually no fan of paying for functionality that I usually think should already be in FileMaker (search and replace in scripts, for example). Unfortunately, there isn't a File Exists() function in FM. Checking the file existence was just a suggestion to debug a possible bad path.

               

              I've used PDFs in many FileMaker applications and the kind of stuff you're doing works fine all the time.

               

              Did you try the dialog to build the file path as I suggested above?

               

              Also, try to create a local script that does the same thing in a local FileMaker copy until you're sure your script is correct.

               

              ----

               

              Macs are great with PDFs, so is FileMaker.

               

              It's hard to debug someone else's code when you have hard-coded paths that can't be tested by users here.

               

              Sorry I couldn't help you more.

               

              Good luck!

               

              - m

              • 4. Re: Can't open pdf on mac
                TSGal

                dinoeverett:

                 

                Thank you for your post.

                 

                First, check the contents of your "Item Records::url" field.  Make sure there is no leading or trailing spaces or extraneous characters (carriage return).

                 

                Should I assume that all PDF files begin with "Notebooks"?  If this is not the case, and the files are in a Notebooks folder, then change your $server calculation to end with a slash.  That is:

                "file://fs02.cntv.usc.edu/Departments/Archives/USCDesktop/Notebooks/"

                 

                The same would apply to the "smb" calculation.

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: Can't open pdf on mac
                  dinoeverett

                  TSGal - You have almost done it, They are all in a folder marked NOTEBOOKS, and now it goes directly to the appropriate pdf and highlights it, but still doesn't actually open it...It seems like there is just one small step missing

                  • 6. Re: Can't open pdf on mac
                    TSGal

                    dinoeverett:

                     

                    FileMaker is using the OS WebKit to render web pages.  For Mac OS X, this is modeled after Safari.  If you can open the file with Safari but not with FileMaker Pro, then I would like to see the file.

                     

                    I don't have the name to any of your PDF files, so create a test PDF file, name it "test.pdf", and place it in the Notebooks folder so I can try accessing it from my computer.

                     

                    TSGal

                    FileMaker, Inc.

                    • 7. Re: Can't open pdf on mac
                      dinoeverett

                      Is there a script step to just have filemaker open Adobe Pro from the mac? the way our windows computer does?    The only problem with creating the test.pdf, is that the NOTEBOOKS folder with the files are on a closed USC server that is only open to the computers in our department...

                      • 8. Re: Can't open pdf on mac
                        TSGal

                        dinoeverett:

                         

                        Since PDF files are inherent to Mac OS X, they will open with either Preview or Adobe, depending how you have PDF files set up.  Select one PDF file, perform a Get Info, and under "Open with", select the application you want to open.

                         

                        FileMaker Pro cannot open Adobe application.  When FileMaker opens a URL, it is using the OS WebKit to display web pages.  In this case, the PDF file.  Check to make sure you have the Internet Plug-ins "AdobePDFViewer.plugin" and "AdobePDFViewerNPAPI.plugin".  When you open the file in a Web Viewer, it should open with the default application.

                         

                        What version of Safari are you using to open the PDF files?

                         

                        TSGal

                        FileMaker, Inc.

                        • 9. Re: Can't open pdf on mac
                          dinoeverett

                          So does that mean I need to change the "Open with" choice to Safari? or leave as is, and just make sure Safari has the plugins?

                           

                          I am now reinstalling the plugins since earlier people told me to delete them, so that filemaker would open one of the adobe programs.

                           

                          I have Safari 6.2.3

                          • 10. Re: Can't open pdf on mac
                            TSGal

                            dinoeverett:

                             

                            What version of Mac OS X are you running?  You should be running at least Safari 9.0 under Mac OS X 10.10 and Mac OS X 10.11 (9.1 is current).

                             

                            What occurs when you open the file in Safari?  Copy that link to a WebViewer in FileMaker Pro and see if that works.  If that works, then use the "Open URL" script step with the same static link.  Does this work?

                             

                            TSGal

                            FileMaker, Inc.

                            • 11. Re: Can't open pdf on mac
                              dinoeverett

                              This computer is 10.8.5 which is old, but so far we switched to make safari the default for opening pdf's and it does the same thing where it opens the folder and highlights the specific pdf, but does not open it.

                              • 12. Re: Can't open pdf on mac
                                TSGal

                                dinoeverett:

                                 

                                Sounds like Safari is acting the same as FileMaker Pro.  Once you get the Safari situation handled, it should then work with FileMaker Pro.  Start by checking you have Read & Write privileges and also ports (80, 443, 5003) are open.

                                 

                                TSGal

                                FileMaker, Inc.

                                • 13. Re: Can't open pdf on mac
                                  dinoeverett

                                  OK I am not sure if this has anything to do with it, but normally I have been updating the script from my PC, but this one and only time I just updated from the mac, and it worked.

                                   

                                  "file:///Volumes/Departments/Archives/USCDesktop/NOTEBOOKS/"

                                   

                                  FINALLY ! !! !!  Thank you so much TSGal.....