8 Replies Latest reply on Aug 22, 2012 7:19 AM by bennieboop

    FMPA 11 Viewing PDF in Web Viewer, MAC path issues

    bennieboop

      I am in FMPA 11 and am attempting to use the web viewer to open file paths to specific pdf files and view them. It works fabulously on the Windows side, but I can't seem to get it to view the pdf of the MAC side. The window just says loading and nothing happens. At this point I believe I am having a file path issue for the MAC. The pdf files are stored on a public server and the path to them is absolute. When setting up my web viewer, I instruct it to open a custom web address. Below is the sample:

       

      Case ( Get ( SystemPlatform ) = -2 ; "file://SERVERNAME/Public/FOLDER/2002 Folder/03 The PRODUCT Folder/Folder/Folder/" & Account Master::PdfName ; Get ( SystemPlatform ) = 1 ; "filemac//SERVERNAME/Public/FOLDER/2002 Folder/03 The PRODUCT Folder/Folder/Folder/" & Account Master::PdfName )

       

      The above calculation first determines the system platform of my user, then based on the calculation sets the URL inside the web viewer. The folder names have been made generic, but you get the gist. I know file paths differ from platform to platform and MAC can be picky, so I thought I would seek your assistance to ensure that I have the correct file path name for MAC.

       

      Thanks in advance for your assistance.

        • 1. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
          steve_ssh

          Hello Bennieboop,

           

          Have you tried using:

           

             "file://SERVERNAME/Public/FOLDER/2002 Folder/03 The PRODUCT Folder/Folder/Folder/" & Account Master::PdfName

           

          regardless of platform?

           

          That would be what I would expect would work for this.

           

          HTH,

           

          -steve

          • 2. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
            pthomas

            We have the exact same situation and the only difference in the filepaths between windows and mac is:

             

            Windows: file://IPADDRESS/...

             

            Mac: file:///Volumes/...

             

            If the generic solution that Steve posted doesn't work for you maybe give this a try!

             

            Cheers,

             

            Paul.

            • 3. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
              steve_ssh

              I'd actually try Paul's suggestion first.  What he posted looks even more fitting than my suggestion.  Thanks Paul.

               

              Best,

               

              -steve

              • 4. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
                bennieboop

                So, I tried with the "file:///Volumes/" for the MAC.  It was kind of strange, at first the web viewer came up with its customary "Cannot locate" error.  Then it showed the .pdf document.  Then the area went completely black.  I am so happy to be getting closer and wanted to thank you both for your advise.  I did not have time to fully test the theory yesterday on the MAC (I run pc, my boss runs MAC, so actually he did not have the time).  I am hoping to look into it further today and let you know how it goes.

                • 5. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
                  bennieboop

                  Okay...the screen is now white and at the bottom it says "The requested URL was not found on this server".  The MAC path would be: "file:///Volumes"  Volumes is written out and does not stand for anything, like on the pc side it IP ADDRESS is a place holder for me to put the IP Address in?

                  • 6. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
                    steve_ssh

                    Have you tried doing something like the following?

                     

                      1) Make sure that the file is really where you expect it to be.

                     

                      2) On a Mac, open up a web browser and navigate the web browser to show you the file.

                     

                      3) Make a note of the exact URL that the web browser claims it is using to access your PDF.

                     

                      4) Try that same URL in your FM solution, for the case when the platform is Mac.

                     

                    HTH,

                     

                    -steve

                    • 7. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
                      bennieboop

                      Good news, yesterday it worked.  Today; however, the web viewer is saying it can't locate the URL on the server....I am really starting to become anti-MAC.  I tried the path in my Safari brower and it takes me to the document, so the path is good.  I have a field in my layout that has the file name in it (ie CustomerFile.pdf).  The web viewer script first determines whether the user is MAC or PC.  Then based on the platform, it calculates the URL to set the web viewer.  The pathway looks like this:

                       

                      "file:///Volumes/(rest of the path to the file)" & FileName

                       

                      Yesterday, MAC saw this, entered the path and added on the field contents from FileName and opened the .pdf in the web browser.  I tested this on three or four different records and it work flawlessly.  I have 1560 records that need this done to it.  So, I used a Macro to copy the file name from the directory to an Excel spreadsheet.  Then I used the Excel spreadsheet to put ".pdf" after the file name.  Then I imported these into the appropriate customer files into the FileName field.  Now, MAC does not open the .pdf in the web viewer.

                       

                      So, I thought maybe spaces or something got added during the import, so I deleted the content of the FileName field, added a Trim (Self) function to the field and imported again.  Still, MAC will not open the files in the web viewer.i

                       

                      You have been most helpful thus far and I was hoping you might have a tidbit of information, guidance, suggestion to get me past this hurdle.  Thanks so very, very, very. much!

                      • 8. Re: FMPA 11 Viewing PDF in Web Viewer, MAC path issues
                        bennieboop

                        I added another field to my layout.  It is a calculation field using the GetAsText fuunction.  It gets the FileName field contents as text.  I ise this field in the calculation for the Set Up Web Viewer script step and now it is working again.  So, something with Excel import adding something to the FileName field that MAC does not like. 

                         

                        It works again.