Here’s an example file you can use to print web viewers in FileMaker 16. We use DayBack Calendar as an example, but you can use these scripts in your own file too. The scripts manage the window sizing which can make printing web viewers tricky. They also use the free ScriptMaster plugin to make PDFs for printing since FileMaker 16 no longer supports printing web viewer content on Mac.

In FileMaker 16, we lost the ability to print the web viewer, whether using Preview mode or Save/Send As PDF. This isn’t always an issue: in many cases, it may make more sense to create a dedicated print layout or sub-summary report to print calendar data. Often this is the only way to print all the text of an event. But sometimes it is best to print web viewer itself. For example, DayBack’s Month, Horizon, and other views would be too tough to replicate without the web viewer for printing.

Thanks to different plugins, we actually can print the web viewer in 16 — by taking screenshots. Once a screenshot is taken, you can insert it into a container field and Preview Mode and Save As PDF will have no trouble printing that image in a container. (Thanks to the FileMaker community at this thread for providing the idea to use screenshot functions as a workaround to printing the web viewer in FM16!)

Here’s a video of this in action:

If you’d like to grab that file and get to work, here it is: DayBack_PrintWebviewerExample

Printing FileMaker Web Viewers: Looking Closer

And here’s a closer look at the first script shown in that video:

Printing Web Viewers in FileMaker 16 - example script

Note: The screenshot function used in this script comes standard with the (free) ScriptMaster plugin. The demo file includes a script to initialize the screenshot function on startup, but to use the screenshot functionality, you’ll need to have the ScriptMaster plugin installed. Other plugins also offer screenshot functions, so they could be used instead. Once the plugin is installed, set the script below to run at the end of DayBack’s “Upon Opening” script to initialize the screen capture function. (You’ll find both these scripts in our example file.)

Printing FileMaker 16 Web Viewers using a plugin

The simple print script above is great because it will print DayBack’s web viewer just as it appears for the user in their open window. But we can be more precise than this. By opening a new window, we can size the window to an exact ratio that will fill our container on the print layout. We can also take advantage of larger screens to capture higher resolution screenshots. The “Print Calendar [ Step ]” script in the example file does just that, but puts an upper limit on the window size, so that objects don’t appear too small when the screenshot is generated on a large screen.

Because the script is dynamically sizing the screen capture window, it also accounts for menu bar heights and window chrome, which are different between Mac and Windows. Also, hi-res monitors may have a different “screen scale factor”, which means the width/height point values in FileMaker will not be equal to the pixel values used by the screen capture function. So, on Windows, we need to adjust the capture width and height by Get ( ScreenScaleFactor ).

Going Further

At the end of the video above, we show a custom print script that loops through all the events in a project and prints as many months as are required. It then uses the ScriptMaster plugin to stitch these into a single PDF. We use ScriptMaster a lot for assembling complex PDFs; if you need this kind of help, we’re happy to make scripts like this for you too as part of custom work. Please get in touch if you’d like to know more.

And if you think it’s weird that FileMaker 16 lost the ability to print web viewers on Mac, you’re not alone. Here’s a feature request where folks are asking FMI to standardize on a way of rendering web content across platforms. Even without a standard for both Mac and Windows, FMI could forestall moving to the latest WebKit if critical features were missing. Up-vote this if you agree: =)

Tagged with →  

3 Responses to Printing Web Viewers in FileMaker 16

  1. Jim says:

    Great! Thank you.

  2. Vincenzo says:

    Thanks Dan, this is a great workaround for MAC, but i have the same issues with Windows, with simple FM solution that are not running on FMS. Any ideas on that platform?? Thanks

    • seedcode says:

      Hi Vincenzo, Dan’s technique and example file here also works on Windows. He was just talking about Macs a lot because that is where the problem first showed up in FileMaker 16. Let us know if you’re unable to get this example file/plugins working on Windows.


      – John

Leave a Reply

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

Share →
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these