Name: revShowPrintDialog

Type: command

Syntax: revShowPrintDialog <showPageSetup>, <showPrint> 

Summary: Controls display of the Page Setup (on <Mac OS|Mac OS systems>) and Print dialog boxes when using the <revPrintField> or <revPrintText> <command|commands>.

Introduced: 1.0

OS: mac,windows

Platforms: desktop,web

Security: printing

Example:
revShowPrintDialog true,true -- shows both dialogs

Example:
revShowPrintDialog false,true -- shows only Print dialog

Example:
revShowPrintDialog false,the hilite of button "Set Options"

Parameters:
showPageSetup (bool): 
showPrint (bool): 

The result: If the user cancels the print dialog box, the next <revPrintField> or <revPrintText> <command> in the current <handler> is skipped, and the <result> is set to "Cancel" after the <revPrintField> or <revPrintText> <command> is <execute|executed>.

Description:
Use the <revShowPrintDialog> <command> to let users specify options for printing.

Before printing, applications usually display a dialog box where the user can set certain print-related properties. (This dialog is displayed by the operating system, not by LiveCode.) Typically, the options in the dialog box include enlargement or reduction, landscape or portrait mode, and paper size, but the exact options are determined by the printer driver and the operating system. If you use the <revShowPrintDialog> <command> in a <handler> before a <revPrintField> or <revPrintText> <command>, these <command|commands> display this <dialog box>.

>*Cross-platform note:*  On <Mac OS> and <OS X|OS X systems>, the <showPageSetup> <parameter> controls whether the Page Setup <dialog box> appears, and the <showPrint> <parameter> controls whether the Print dialog box appears. On <Windows> systems, the <showPageSetup> <parameter> controls whether the standard printing options <dialog box> appears, and the <showPrint> <parameter> is ignored.

If you use the <revShowPrintDialog> <command> outside a handler where a <revPrintField> or <revPrintText> <command> is <execute|executed>, the <revShowPrintDialog> <command> has no effect. The <command> sets printing options only for the currently <execute|executing> <handler>.

>*Important:*  The <revShowPrintDialog> <command> is part of the <Printing library>. To ensure that the <command> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section on the General screen of the <Standalone Application Settings> window, make sure that "Printing" is selected in the list of script libraries.

>*Note:* When included in a <standalone application>, the <Printing library> is implemented as a hidden <group> and made available when the <group> receives its first <openBackground> message. During the first part of the <application|application's> startup process, before this <message> is sent, the <revShowPrintDialog> <command> is not yet available. This may affect attempts to use this <command> in <startup>, <preOpenStack>, <openStack>, or <preOpenCard> <handler|handlers> in the <main stack>. Once the <application> has finished starting up, the <library> is available and the <revShowPrintDialog> <command> can be used in any <handler>.

References: startup (message), openBackground (message), preOpenStack (message), openStack (message), preOpenCard (message), answer printer (command), revPrintText (command), group (command), revPrintField (command), answer page setup (command), application (glossary), standalone application (glossary), dialog box (glossary), execute (glossary), command (glossary), Windows (glossary), main stack (glossary), OS X (glossary), result (glossary), Standalone Application Settings (glossary), Mac OS (glossary), message (glossary), parameter (glossary), handler (glossary), library (library), Revolution custom library (library), Printing library (library)

Tags: printing
