KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Printing Web Area Content
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: October 4, 2021

The contents of a Web Area can be printed using the javascript function:
   window.print()

this will initiate a print like on any web browser.

To use the function in 4D, the following code can be used:

WA EXECUTE JAVASCRIPT(*; $webAreaName; "window.print()"; *)

With the new offscreen web area feature, the web area can be used to run some content offscreen like a PDF or build an HTML formatted document and then printed without needing to run a form.