Tips for Previewing PDF in Windows

Tips for Previewing PDF in Windows

Working with PDFs in FileMaker can be tricky on different platforms since the behavior is not entirely consistent. One issue we’ve come across is the ability to preview PDFs directly in FileMaker Pro on Windows machines. Unlike on the Mac, where the PDF rendering library is built in, Windows does not have this library so the ability to automatically display PDFs in container fields is not available.  

PDF Preview on the Mac
PDF Preview on Windows

We’ve come up with three possible workarounds to solve this issue. Look for a demo file in an upcoming post to fully demonstrate these options.

Use a Web Viewer

The PDF can be displayed using a web viewer. This approach involves exporting the container field, storing the PDF in the temporary folder, and then referencing the locally stored temp file. The web viewer would be reloaded each time it is viewed. This option may work well in some circumstances, but could cause problems due to drive space requirements.

Use a Plugin

The second option is to use the MBS plugin or another plugin to display the PDF. Although this solution relies on a third party add on which must be maintained and updated, the MBS plugin does provide a comprehensive set of functions for displaying, reading and manipulating PDFs. To use this plugin a license for DynaPDF must be purchase as well as the license for the MBS plugin.

Use 2 Container Fields

This option makes use of two separate container fields. One stores the actual PDF, which can be used when exporting the PDF. The second container field is used to stored an image (jpg or png) of just the first page of the PDF. The one page image is used to display the preview. This option requires the user to save a copy of first page of the PDF as a jpeg or png file and then insert it into the second container field. The script written to insert the PDF document can be written to prompt the user for both files.

While possibly too labor intensive for a database storing a large number of PDF documents, we did use this approach successfully in an application recently where the users would only be inserting a few PDF documents per month.  

Please contact us if you are interested in having one of these solutions built into your FileMaker database. 

Leave a Reply

Your email address will not be published. Required fields are marked *