1 2 Previous Next 15 Replies Latest reply on Dec 17, 2015 2:50 PM by monkeybreadsoftware

    PDF in container field shows as icon

    willy_peeters

      Hi,

       

      In order to show a thumbnail of the first page of a pdf I defined a container as "static" on a layout. But a pdf-icon is shown in the application in instead of a thumbnail.

       

      When I change the container to "optimized for interactive content" everything works. But this is not what I want, namely just a preview of the first page of the pdf.

       

      The WebDirect manual says on page 17 : "By default, container fields are optimized for static content. Web users see either a static graphic or a link to the container field object."

       

      I can not find where is specified what makes that the static graphic is shown or when the icon shown.

       

      Application is on FileMaker server accessed by WebDirect.

       

      Hope someone can help,

      Willy

        • 1. Re: PDF in container field shows as icon
          monkeybreadsoftware

          There are two modes.

          Interactive mode does load PDF into webviewer to show via PDF Plugin from browser.

          The other mode shows it as image.

           

          You can use our MBS Plugin to create preview for PDF and include it. So PDFKit.GetPDFDocument or DynaPDF.GeneratePreview include a JPEG preview in the container. Once the plugin added the preview, FileMaker can show the preview.

          • 2. Re: PDF in container field shows as icon
            keywords

            The issue could simply be how the container content got there. If a PDF is inserted into a container field using Insert > File it will show up as an icon. If it is inserted using Insert > PDF or Insert > Picture, or just dragged onto the field it will show as a thumbnail.

            The other part of your question: you can have two instances of the field on a layout, one optimised for images, the other for for interactive and you will get thumbnail and interactive views on the layout. You change the settings using the Dat Formatting Inspector.

            • 3. Re: PDF in container field shows as icon
              willy_peeters

              Thanks Keywords for your answer. Will it show as thumbnail if it is copied with a Set field?

              The PDF is first inserted using insert > PDF in a temporarily global field. After some checks the definitive record is made and the PDF copied by a Set field.

              Could it be that this action removes the thumbnail information?

              • 4. Re: PDF in container field shows as icon
                keywords

                No, I don't think that's the issue. I just ran a quick test of that scenario and transferring contents from a global to a standard container does not alter things. If the file shows as an icon in the global field it will still show as an icon when copied over to the standard field. Note that the Insert > PDF option is only available if the global field is optimised for interactive content.

                • 5. Re: PDF in container field shows as icon
                  willy_peeters

                  The global field is optimised for interactive content.

                  I made some more test and the problem seems related to WebDirect.

                  When I run the script from my FileMaker Pro on Mac the thumbnail is shown.

                  When I do exactly the same from WebDirect only the pdf-icon is shown.

                  This is annoying because the live application should run on WebDirect.

                   

                  What could be the cause?

                  • 6. Re: PDF in container field shows as icon
                    keywords

                    Hmmm. My testing has just been inside FM. Don't know much about WebDirect, sorry. Perhaps someone else will take up the thread.

                    • 7. Re: PDF in container field shows as icon
                      willy_peeters

                      I made a new test. A file with just one container field.

                      On a layout this field twice : once optimised and once static.

                      When I drag a pdf-file in the optimised field in FM Pro : a preview is shown in the static field.

                      Do the same thing in WebDirect : a icon is shown in the static field.

                      Is this a issue in WebDirect? Is there a possible workaround?

                      • 8. Re: PDF in container field shows as icon
                        keywords

                        A couple of things:

                        1.     I get pdf preview in both instances of the field, though different. In the image instance I see just a static preview of the first page, in the interactive instance I get a scrollable view. If I use Insert > File I get an icon in both.

                        2.     Do you get the different behaviour only when you have dragged the pdf in using WebDirect? What happens if you have inserted the pdf in FMPro, then view it in WD?

                        • 9. Re: PDF in container field shows as icon
                          willy_peeters

                          1. I have the same behavior using FMPro. I use Insert > PDF and get the correct behavior : thumbnail of first page in static, scrollable in interactive.

                          2.

                          • If I drag or use Insert > PDF (script) in WebDirect I get : icon in static, scrollable in interactive.
                          • But if I insert the pdf in FMPro it will view correctly in WebDirect : thumbnail in static, scrollable in interactive. What makes me assume that the problem arrises by the insert in WebDirect
                          • 10. Re: PDF in container field shows as icon
                            keywords

                            That is what I suspected. Can you avoid inserting container content that way?

                            • 11. Re: PDF in container field shows as icon
                              user19752

                              I guess you both testing on only OSX.

                              PDF is one of image format on OSX, but not on Windows.

                              Insert>PDF on Windows is scrollable in interactive, but icon in static.

                              • 12. Re: PDF in container field shows as icon
                                willy_peeters

                                Indeed my FMPro is on OSX, but the WebDirect insert is done on our FM Server who runs on a Windows server.

                                If this is normal behaviour is there a possible workaround?

                                • 13. Re: PDF in container field shows as icon
                                  keywords

                                  Have you tried inserting via a script instead of drag and drop? You could also try doing that using Perform Script on Server. You would need to set the field on the WebDirect layout to disallow direct entry, so that drag and drop cannot be used.

                                  • 14. Re: PDF in container field shows as icon
                                    willy_peeters

                                    Script or drag gives the same result.

                                    If inserts in Windows always gives a icon in case of PDF then I doubt that Script on Server will give a solution. The insert via WebDirect is also made on the Server as WebDirect does all activities on the server, not on the user computer.

                                    And as our server is Windows and Windows does not make thumbnails of pdf's... means that I have a problem.

                                    That's why I am looking for a workaround. Is it possible to convert the pdf to a jpeg (in another field) with standard Filemaker commands?

                                    1 2 Previous Next