<doc>
  <legacy_id>2143</legacy_id>
  <name>revShowPrintDialog</name>
  <type>command</type>
  <syntax>
    <example>revShowPrintDialog <i>showPageSetup</i>,<i>showPrint</i></example>
  </syntax>
  <library>Printing library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
    <category>Printing</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="answer printer">answer printer Command</command>
    <command tag="answer page setup">answer page setup Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
  </platforms>
  <classes>
    <desktop/>
    <web/>
  </classes>
  <security>
    <printing/>
  </security>
  <summary>Controls display of the Page Setup (on <glossary tag="Mac OS">Mac OS systems</glossary>) and Print dialog boxes when using the <command tag="revPrintField">revPrintField</command> or <command tag="revPrintText">revPrintText</command> <glossary tag="command">commands</glossary>.</summary>
  <examples>
    <example>revShowPrintDialog true,true <i>-- shows both dialogs</i></example>
    <example>revShowPrintDialog false,true <i>-- shows only Print dialog</i></example>
    <example>revShowPrintDialog false,the hilite of button "Set Options"</example>
  </examples>
  <description>
    <p>Use the <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> to let users specify options for printing.</p><p/><p><b>Parameters:</b></p><p>The <i>showPageSetup</i> is an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to true or false.</p><p/><p>The <i>showPrint</i> is an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to true or false.</p><p/><p><b>Comments:</b></p><p>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 <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> in a <glossary tag="handler">handler</glossary> before a <command tag="revPrintField">revPrintField</command> or <command tag="revPrintText">revPrintText</command> <glossary tag="command">command</glossary>, these <glossary tag="command">commands</glossary> display this <glossary tag="dialog box">dialog box</glossary>.</p><p/><p><img src="202652"/> <b>Cross-platform note:</b> On <glossary tag="Mac OS">Mac OS</glossary> and <glossary tag="OS X">OS X systems</glossary>, the <i>showPageSetup</i> <glossary tag="parameter">parameter</glossary> controls whether the Page Setup <glossary tag="dialog box">dialog box</glossary> appears, and the <i>showPrint</i> <glossary tag="parameter">parameter</glossary> controls whether the Print dialog box appears. On <function tag="openStacks">Windows</function> systems, the <i>showPageSetup</i> <glossary tag="parameter">parameter</glossary> controls whether the standard printing options <glossary tag="dialog box">dialog box</glossary> appears, and the <i>showPrint</i> <glossary tag="parameter">parameter</glossary> is ignored.</p><p/><p>If the user cancels the print dialog box, the next <b>revPrintField</b> or <command tag="revPrintText">revPrintText</command> <glossary tag="command">command</glossary> in the current <glossary tag="handler">handler</glossary> is skipped, and the <function tag="result">result</function> is set to "Cancel" after the <command tag="revPrintField">revPrintField</command> or <command tag="revPrintText">revPrintText</command> <glossary tag="command">command</glossary> is <glossary tag="execute">executed</glossary>.</p><p/><p>If you use the <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> outside a handler where a <command tag="revPrintField">revPrintField</command> or <command tag="revPrintText">revPrintText</command> <glossary tag="command">command</glossary> is <glossary tag="execute">executed</glossary>, the <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> has no effect. The <glossary tag="command">command</glossary> sets printing options only for the currently <glossary tag="execute">executing</glossary> <glossary tag="handler">handler</glossary>.</p><p/><p><img src="202653"/> <b>Important!</b> The <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Printing library">Printing library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure that "Printing" is selected in the list of script libraries.</p><p/><p><b>Note:</b> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Printing library">Printing library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>revShowPrintDialog</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>