How to print from your app

You can print the current screen contents from your app using the statement

window.print()

For this to work from an iOS device, you will need to be connected by WiFi to a network with a properly configured printer. For example, if you are connected to a Mac running Mac OS 10.6, you can print to any AirPlay enabled printer.

While Apple has only a short list of AirPlay printers built in, almost any printer connected to the network will work if you run Air Printer Lite or Air Print Activator on the system.

jQuery Mobile 1.4 adds some extra styling which can interfere with printing a full page. Here is the workaround:

Function btnPrint_onclick()
  Dim h = Page_PrintTest.style.minHeight
  Page_PrintTest.style.minHeight = ""
  window.print()
  Page_PrintTest.style.minHeight = h
End Function