This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
Is in print preview
|
Is in print preview -> Function result | ||||||||
Parameter | Type | Description | ||||||
Function result | Boolean |
![]() |
True = Print preview, False = No print preview |
|||||
The Is in print preview command returns True if the Preview on Screen option is checked in the printing dialog box and False otherwise. This setting is local to the process.
Unlike the Get print preview command, Is in print preview returns the final value of the option, after the dialog box is validated by the user. So this command lets you determine with certainty whether printing actually takes place in "preview" mode.
This example takes all types of printing into account:
SET PRINT PREVIEW(True) //Print preview by default
PRINT SETTINGS
If(OK=1)
//The user may have changed the print destination
If(Is in print preview) // True if preview
FORM SET OUTPUT([Invoices];"toScreen")
Else
FORM SET OUTPUT([Invoices];"toPrinter"
End if
OPEN PRINTING JOB
ALL RECORDS([Invoices])
PRINT SELECTION([Invoices];>)
CLOSE PRINTING JOB
End if
Product: 4D
Theme: Printing
Number:
1198
Created: 4D v13
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)