10 Replies Latest reply on Feb 23, 2017 6:55 AM by JamesTudor

    using containers and opening in adobe

    kkalach

      Good morning,  I have watched and look at several discussions on containers.  I have created a container and have dragged a pdf document into it.  I am using FM14.  I want to see the document front page with out the scroll bar or the document type on left side.  and I want to be able to click on and open in another window in adobe.  Can you please help me with this.  I have document as interactive and fit to window but still not working.  Thanks

        • 1. Re: using containers and opening in adobe
          peterbouma

          Format the container field on the layout as Optimized for images (Data tab in the Inspector), it will display the front page. Then, make a button (or turn the field into a button) with the following script:

           

          Set Variable[ $temppdf ; Get( TemporaryPath ) & GetContainerAttibute( YourTable::YourContainerField ; "Filename" )

          Export Field Contents[ YourTable::YourContainerField ; $temppdf ; Automatically open ]

           

          This will open the PDF in the default application for viewing PDFs, which is mostly Preview (on Mac) or Adobe Acrobat. You don't have to worry about the exported PDF, it will automatically disappear from the temporary folder when you quit FM.

           

          Peter Bouma

          Lesterius Netherlands

          • 2. Re: using containers and opening in adobe
            kkalach

            I am working in FM14.  It wont let me enter this script.

             

            Karen Kalach

             

            Assistant to Bill Mann

             

            LPL Financial

             

            203-271-3192

             

            www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

            • 3. Re: using containers and opening in adobe
              peterbouma

              Hi Karen,

               

              Sorry, at least I made a typo: GetContainerAttibute must be GetContainerAttribute.

               

              I also use FM14 (on Mac). Before posting my reply, I verified that this setup was working in a dummy file, and then typed it in. Apart from the spelling error, how did you try to recreate the script? You cannot simply copy and paste my text into the script editing window. What you see in my earlier reply is an approximation of how the script steps look like after applying the settings.

               

              One thing you need to adjust, of course, is the reference to your container field. And $temppdf is a variable containing the path to the exported file, and is what you should paste (or type) into the textbox for specifying the output file. 'Automatically open' is a checkbox that you should switch on. The setting of this checkbox is displayed in the resulting script step.

               

              I added a small demo file. If you change the table and field name to those of your application you can copy and paste the script.

               

              Peter Bouma

              Lesterius Netherlands

              • 4. Re: using containers and opening in adobe
                keywords

                If all you need to do is be able to view the PDF large enough to be able to read it, you could consider a popover button that contains a large interactive version of the field—no need to export, just pop it open and read away.

                • 5. Re: using containers and opening in adobe
                  kkalach

                  Thank you so much for your response.  I started tying the script and it was saying that Set Variable was not a valid field.????  Sorry for my stupidity, I am self taught and am trying to program by myself and so far have done a great job, just need help with some of the more intricate processes....the simplier the better for me!  haha this is a little above my knowledge

                   

                   

                   

                  Basically we want to insert client application to their record and just be able to view them when there are questions

                   

                   

                   

                  Karen Kalach

                   

                  Assistant to Bill Mann

                   

                  LPL Financial

                   

                  203-271-3192

                   

                  www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

                  • 6. Re: using containers and opening in adobe
                    kkalach

                    I think that is what I want.  I created a popover button and it is blank?  do I need to put a script in.  It will be a pdf document of client applications?

                     

                    Karen Kalach

                     

                    Assistant to Bill Mann

                     

                    LPL Financial

                     

                    203-271-3192

                     

                    www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

                    • 7. Re: using containers and opening in adobe
                      peterbouma

                      As keywords correctly pointed out, you can put a popover button on your layout. This popover button will present a (blank) panel when you click it. In Layout mode, you can adjust the placement and size of this panel and place the container field (or better yet, another instance [copy] of it, if you want to leave the original non-interactive small one on the main layout) inside this popover panel. No script needed, it just shows. Sometimes Filemaker is easy . Just make sure that the container is within the boundaries of the popover panel, otherwise it won't be part of it.

                       

                      You can make the panel really big if you like (and the enclosed container as well), so that you can view as much as possible.

                      If you choose "Optimize for: interactive content" for a container field with a PDF in it, it will show scroll bars, page indicators etc., more or less like in Preview or Acrobat. You probably will have to experiment with the setting for Crop to frame / Reduce image to fit.

                       

                      Don't apologize for being a novice, we all started humbly experimenting .

                       

                      Peter Bouma

                      Lesterius Netherlands

                      • 8. Re: using containers and opening in adobe
                        kkalach

                        Yes creating the popover was easy.  So basically I have a pdf inside a container and I added a popover button. when I hit view pdf it opens blank...I am sure there is something easy I did not do...I changed the view back to image...but I guess I can change to whatever, my main goal is to get the popover to work.  thanks for your help!

                         

                        Karen Kalach

                         

                        Assistant to Bill Mann

                         

                        LPL Financial

                         

                        203-271-3192

                         

                        www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

                        • 9. Re: using containers and opening in adobe
                          SvenLoetscher

                          Thanks for the script. I use to have the popover button but prefer opening the attached PDF in Preview/Acrobat.

                          What gives me a headache though is that I use this layout in List View (+100 records) and when scrolling up/down I get an error message from Adobe Reader (see attached), which I can't get around in the settings of the Acrobat Reader. If only there was an app-helper setting where I could specify Preview instead of Acrobat Reader!?

                           

                          Any help is much appreciated.

                           

                          Thanks,

                          SvenScreen Shot 2016-04-08 at 13.53.35.png

                          • 10. Re: using containers and opening in adobe
                            JamesTudor

                            Peter Bouma - I needed the same script and it works great for me. The only addition I'm trying to find is that I have 5 containers on one layout and your script only opens the one container that the script sees. Do you know what changes need to be made that one button script could open any container field that is selected on that layout.

                             

                            Thanks James