Printing Web Viewers in FileMaker 16

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: https://community.filemaker.com/ideas/1850 =)

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

9 Comments

  • Robert Parker

    The link per the “at this thread” in this article isn’t working.

    Can you re-link it?

    Thanks!

  • I have colours for each status, which looks cool on screen. But I also print out the calendar on a greyscale laser printer, and this doesn’t look very cool – especially with the lighter yellows and greens with the reverse white writing. Is there a way to do a screen print with just B&W and get that printed?

  • Travis

    I assume FM 17 has this same printing issue/necessity for this work around?

    • seedcode

      Yes, it remains unaddressed in FM18.

  • Michael Huskey

    Hello, John. I cannot find the screen capture function within the Scrip master plug-in options. Has that been removed, to your knowledge?

    my calculation now says “function missing”. I see on the 360 website that screen capture is an option, but it doesn’t show up, after installing the very latest plug-in, 5.1. Thank you for any help you can provide.

  • Vincenzo

    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

      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.

      Thanks!

      – John

  • Jim

    Great! Thank you.

Leave a Reply

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

Check out some of our other posts ...

Comments in FileMaker Calendar

Highlight Notes and Comments in Your Calendar

Inline Notes in DayBack Calendar The latest DayBack extension adds an icon to your events when there is a comment present that matches your criteria. You can

Closed Through the New Year

SeedCode is closed for our holiday break from December 19th through the end of the year. We’ll have folks available in case of emergencies and

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2023 SeedCode, Inc.