4D v14.3

Is in print preview

Home

 
4D v14.3
Is in print preview

Is in print preview 


 

Is in print preview -> Function result 
Parameter Type   Description
Function result  Boolean in 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.

Example  

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

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 1198

 
HISTORY 

Created: 4D v13

 
SEE ALSO 

Get print preview

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)