12 Replies Latest reply on Sep 2, 2009 7:42 AM by fitz_1

    Opening pdf file with Windows and/or Mac

    ninja

      Title

      Opening pdf file with Windows and/or Mac

      Post

      Good day all,

      This has been a frustrating sideline for some time now but is starting to become costly...

       

      I have FM8.0 throughout the facility, and folks have PC's or Mac's based on their personal biases.  I need to have the database open a different scanned .pdf file depending on the record they are currently viewing.

       

      There is one field that holds a "Windows path" to the .pdf file.  Another field holds the Mac-ish path.

      One button naemd "OPEN ON A PC" performs "Open URL" based on the Winows path field, a second button named (you guessed it) "OPEN ON A MAC" performs "Open URL" based on the mac path field.

       

      The windows opening works fine...always has.

      The Mac button doesn't work...we've fixed it several times by retyping the path name or restarting the Mac (or both, repeatedly and resigning onto the network and ...) and even gone so far as to have FM tech support on site.  The fixes last for between a day and a week...then the button simply won't open the file anymore.  I was not present for the FM Tech support visit, and those that were aren't here anymore...hopefully we won't have to buy the on-site again for the same issue if someone here can help. 

       

      Is there something pertinent about Mac path names, networking, whatever that I'm just totally missing???  Please understand that I'm a deep PC guy, my knowledge in Mac networking or even general Mac system function is fairly limited.

        • 1. Re: Opening pdf file with Windows and/or Mac
          TSGal

          Ninja:

           

          Thank you for your post.

           

          When using the "Open URL" command, is the PDF file on a server?  It should work exactly the same whether it is Mac or Windows, providing you are using the IP address and folder(s).

           

          It sounds like you have it on a local drive.  Then, make sure you have the full file path name.  If the file is in a user directory, make sure you specify the user directory. 

           

          Any additional information would be appreciated. 

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Opening pdf file with Windows and/or Mac
            ninja
              

            TSGal,

             

            During your absence (hope it was grand!), I gave more detailed info about this on another thread "URL path to pdf on server".

             

            It remains a problem, and all the more frustrating since I know it will be something foolish related to my mac ignorance.

             

            Please see the other thread and advise on what you think I'm missing...

            Thanks for your help!

            • 3. Re: Opening pdf file with Windows and/or Mac
              sorrow
                

              Did you ever find the solution to this?  I have same issue.  Opens fine on PC, Cant get it to work on Mac.

               

              Thanks

              • 4. Re: Opening pdf file with Windows and/or Mac
                TSGal

                Sorrow:

                 

                Thank you for your post.

                 

                Do you get an error message when trying to open it on a Mac?  If so, what is the error?  If there is no error, what is appearing in the Container field or Web viewer?

                 

                TSGal

                FileMaker, Inc. 

                • 5. Re: Opening pdf file with Windows and/or Mac
                  sorrow
                    

                  Thanks for the response.  I am not at the client now so I will have to remember.  On the mac clicking on the button opens safari and then it show the page that this page cant be displayed?  I think!  Anyhow the same button works for the pc.

                   

                  I evaluate what platform is being used and then use different path based on the platform.  The mac right now does something like "smb://path"  This is the best work around since I cant get the page to actually open.  The customer thinks it is fine for now but I dont like it.  I have used "file://path"  "filemac://path" with no success.  I have also modifed the path the be the same as if you did a get info on the file, (it shows the path to the file) with no success.

                   

                  The pdf files live on a server many folders deep.  I dont know what operating system they are using, they only have 2 macs and the rest are pc's.  I have 3 different buttons that will look into different folders and open up multiple pdfs and they all work great on the pc, but not on the mac.

                   

                  Thanks for any help!

                   

                  I am a mac ignoramus. :smileyhappy:

                   

                  Scott

                  • 6. Re: Opening pdf file with Windows and/or Mac
                    TSGal

                    Sorrow:

                     

                    Thank you for the additional information.

                     

                    I'm a little confused, because it sounds like you are trying to open this with Safari.  Are you using the "Open URL" script step?  If so, then you need to include "Volumes" prior to the volume name.  For example, if the file is located on the server "MainServer", then the path would be:

                     

                    file:///Volumes/MainServer/folder1/folder2/file.pdf

                     

                    Is this being run from a script?  Are you using "Open URL" script step?  If you could be a little more specific what you are doing and trying to accomplish, it will help me give you a more complete answer.

                     

                    TSGal

                    FileMaker, Inc. 

                    • 7. Re: Opening pdf file with Windows and/or Mac
                      sorrow
                         Yes, you are correct I am using the open url script step in my script, I evaluate what platform and then use different path based on that platform, since the pc one does not work on the mac.  I have tried your suggested format with no success. "file:///Volumes/MainServer/folder1/folder2/file.pdf".

                       

                      Unfortunatly I am not at the client now so I cant give you the exact path that is being used.  I have also tried using the Send Event script step (Opening in the preview app on a mac), with different various paths, with no success.

                       

                      I am going to be back at the client on tues. I will then give you the exact paths I am using if that would be helpful.

                       

                      Thanks again!

                      • 8. Re: Opening pdf file with Windows and/or Mac
                        TSGal

                        Sorrow:

                         

                        If you are currently on a Mac, mount a server on your computer.  Launch Safari (or any browser), pull down the File menu and select "Open File...".  Select the mounted server, go into the folders until you find the PDF file and open.  If all goes correctly, the browser will open a new window with the full URL showing.  You can then copy this URL and paste it into the "Open URL" script step for the Mac.  Execute the script, and you will see the file appear.

                         

                        This should give you a good start when you visit the client site on Tuesday, and hopefully, you will save you from another trip to the client site.  :-)

                         

                        Have a good weekend, and let me know how it turns out.

                         

                        TSGal

                        FileMaker, Inc.

                        • 9. Re: Opening pdf file with Windows and/or Mac
                          ninja
                            

                           

                          Howdy Sorrow,

                           

                          With much help from TSGal and Orlando offline, and a little bit of luck with a wrong button click, it started working for me.  My apologies for never getting around to posting what worked for me here.

                           

                          For PC's, the "Open URL" method works quite nicely...but not for Mac's.  You end up opening the default web browser and searching online...what a pain.

                           

                          What worked on the Mac's was "Send Event", but even that had serious issues trying to open the file with Adobe Reader or Adobe Acrobat.

                           

                          At the end of the day, I accidentally clicked "Reader" instead of "Adobe" in the Send Event options window and it worked nicely.  My script now uses a Get(SystemPlatform) step, and uses "Open URL" for PC's and "Send Event" for Macs.

                           

                          When using the Send Event:

                          1. Set a variable "$path" to the target file location or field containing the pathname

                                   Set Variable [$path;Value:Table1::Target_File_Path]

                          2. Send Event ["aevt";"odoc";"$path"]

                           

                          I hope this works for you as well...please let us know.

                           

                           

                          Edit:  Not familiar with the Mac's, I called it "Reader"...when the window opens showing the pdf file, the window is running "Preview".  In the Send Event settings, choose to 'Send the "Open document/application" message', "File" radio button and type "$path" in the specify file window.  The "File Type" setting on the top line of the Send Event dialog shows "<unknown>".
                          • 10. Re: Opening pdf file with Windows and/or Mac
                            sorrow
                              

                            Hi Ninja,

                             

                            Thanks for the update!  I as well tried using the "Send Event" with the "Preview" clicked.  I used the "Preview" because it is what opens up when you click on the PDF directly.

                             

                            I have 2 things to try now, so I hope I will have more success.  The Mac users are fine with the way it works right now, but I am not happy, so I am driven to find a way to get it working similar to the PC.

                             

                            Thanks so much for the help!

                             

                            Sorrow

                            • 11. Re: Opening pdf file with Windows and/or Mac
                              ninja
                                

                              Howdy Sorrow,

                               

                              I can't say I'm thrilled with the platform split either, but it's working so I'm leaving it alone for now.

                               

                              If you come up with a method that works on both platforms, please post it.  (i.e. please do what I didn't do... ;) )

                              • 12. Re: Opening pdf file with Windows and/or Mac
                                fitz_1
                                  

                                Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, 

                                Ever since I found that Bento would do this I have been trying to get my FMP10 to do it also.  Hopefully FMP will include the same simpler method to launch non-FMP files in a future update.

                                 

                                Fitz