PrintScreen() Function
- Last UpdatedFeb 21, 2017
- 1 minute read
You can write a script to print the entire WindowViewer screen with the PrintScreen() function.
Syntax
PrintScreen (ScreenOption, PrintOption)
Parameters
ScreenOption
Determines how much of the WindowViewer screen is to be printed. A literal integer value, integer tagname, or integer expression.
1 - Print the client area, no menus (default)
2 - Print the entire window area, including menus
PrintOption
Determines how the printed image is to be stretched to fit on the printout.
-
1 - Best Fit:
image is stretched so that it fits either horizontally or vertically on the printout without changing the aspect ratio. (default) -
2 - Vertical Fit:
image is stretched so that it fits vertically on the printout without changing the aspect ratio. The image may be cut off horizontally. -
3 - Horizontal Fit:
image is stretched so that it fits horizontally on the printout without changing the aspect ratio. The image may be cut off vertically. -
4 - Stretch to Page:
image is stretched so that it fits horizontally and vertically on the printout. The aspect ratio may change but the image is not truncated. -
Invalid options, including 0, default to Best Fit.
Note: Popup windows that extend beyond the WindowViewer screen area are cut off.
Example(s)
This script sends a printout of the current entire WindowViewer screen area without menus to the printer queue. The printout contains the screen area stretched so that it fills the printout dimensions.
PrintScreen(1,4);