10 Replies Latest reply on Jul 18, 2016 3:51 PM by nickausaus

    Show PDF Preview in Container Field

    nickausaus

      Hi All

      I'm working on a new solution and am not able to find an answer on this one.

      I am using different methods to save PDF files to container fields:

      1. Via Script - Insert File - I only ever get the PDF 'logo' and the file name

      2. Drag/Drop - works great

      3. Upload File - basically the same as (1) but via an upload button which allows the user to select the file.

       

      I'd like to be able to show a PDF preview in all cases. I've read a few comments about this but can't find an answer.

       

      Thanks in advance!

       

      Nick

        • 1. Re: Show PDF Preview in Container Field
          schamblee

          Set the container from the inspector to Optimized for Interactive content.

           

          Working with PDF files in interactive containers

          • 2. Re: Show PDF Preview in Container Field
            rgordon

            Try this:

             

            1.  Use Insert PDF

             

            3. In the Insert File script step specify the Dialog Options and select Content of File for the Display. You can also use this for 1.

             

            Be be aware that Macs and PCs behave a little difference when dragging PDFs.

            1 of 1 people found this helpful
            • 3. Re: Show PDF Preview in Container Field
              jp98

              rgordon totally agree. i have had this same problem before where i have just tried using the insert file script step. as soon as i use insert pdf and select content for file for the display option it has worked every time.

              • 4. Re: Show PDF Preview in Container Field
                keywords

                nickausaus wrote:

                1. Via Script - Insert File - I only ever get the PDF 'logo' and the file name

                2. Drag/Drop - works great

                3. Upload File - basically the same as (1) but via an upload button which allows the user to select the file.

                Re 1:  Use Insert Picture instead—you will see a preview image of page 1 of the PDF

                Re 2:  Drag and drop defaults to the appropriate method

                Re 3:  As per 1 above, make sure your script step is Insert Picture, not Insert File.

                 

                NOTE 1:  The above will work even if you have the field instance optimised for Images. If, on the other hand, you set the field as optimised for Interactive content, you will have the further option, Insert PDF, also available.

                NOTE 2:  The field optimisation setting applies only to a specific instance of a field. It is possible to have one of each on the same layout if you choose to, and have one field instance showing a preview image while the other shows a scrollable PDF.

                NOTE 3:  Note 2 above still applies regardless of how the file got inserted into the field—Insert Picture and Insert PDF result in the same thing.

                NOTE 4:  Regardless of all the above, you should also be considering what storage option you want to use. My recommendation is External Secure.

                • 5. Re: Show PDF Preview in Container Field
                  rgordon

                  On my Windows 8 computer, using Insert Picture with a container field set to image does not preview the page.

                   

                  Roy Gordon

                  PSFE

                  Sent from my iPhone

                  • 6. Re: Show PDF Preview in Container Field
                    schamblee

                    I never got a preview of the first page with any version of Windows (7,8,8.1,10) and FMP (12,13,14,15) using Insert Picture.  I just tested in FMPA15 with Windows 10.  Adobe icon with filename.

                    • 7. Re: Show PDF Preview in Container Field
                      rgordon

                      On a Mac Insert Picture will only display the first page of a PDF in a container field set to image. 

                       

                      Insert PDF and Insert Picture do not allow you to specify a destination field so you need to make sure the container field is active before using one of these step. Insert File allows you to select a destination field.

                       

                      Roy Gordon

                      PSFE

                      Sent from my iPhone

                      • 8. Re: Show PDF Preview in Container Field
                        nickausaus

                        Thanks rgordon, scramble and jp98

                        All very helpful tips.

                         

                        I still need to do some changes but the Insert PDF script step seems to get the behaviour I want (on my Mac at least - still to test on Windows.

                         

                        For others facing similar - one key thing here that I had missed previously - we need to do 'Set Selection' before the Insert PDF step - setting the destination container.

                         

                        Regarding storage - for now I'm just trying to get a prototype over to my customer to verify calculations etc. I think we will probably go with External Secure as you suggest once we go live. Its going to start out as approx 5 user system.

                        • 9. Re: Show PDF Preview in Container Field
                          keywords

                          Re: "we need to do 'Set Selection' before the Insert PDF step - setting the destination container."

                          Simply navigating to the field (Go to Field) will do. Since a Container field can only ever hold one thing, Set Selection is not needed, although it will serve the purpose.

                          Scripting is always really just replicating in script steps the steps you would take to accomplish a task manually, and that is what you would do to insert something in a container field—click inside the field, then insert from menu.

                          • 10. Re: Show PDF Preview in Container Field
                            nickausaus

                            Thanks keywords

                            I'll be looping back to this today so will try this method. I guess I wasn't clear previously that I had to do this step (whichever way) before using Insert PDF.

                             

                            Thanks all again