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.
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.
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?
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.
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?
Hmmm. My testing has just been inside FM. Don't know much about WebDirect, sorry. Perhaps someone else will take up the thread.
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?
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?
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.
- 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
That is what I suspected. Can you avoid inserting container content that way?
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.
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?
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.
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?