<doc>
	<legacy_id></legacy_id>
	<name>open printing to pdf</name>
	<type>command</type>

	<syntax>
		<example>open printing to pdf <i>filename</i> [ with options <i>optionArray</i> ]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Starts a print loop that outputs directly to pdf rather that the currently configured printer.</summary>

	<examples>
<example>open printing to pdf &quot;mypdf.pdf&quot;</example>
<example>open printing to pdf &quot;help.pdf&quot; with options tOptionArray</example>
	</examples>

	<history>
		<introduced version="4.5">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version=""></changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	  <ios/>
  </platforms>

	<classes>
		<desktop/>
		<web/>
	  <mobile/>
  </classes>

	<security>
	</security>


	<classification>
		<category>Printing</category>
	</classification>

	<references>
		<command tag="answer printer">answer printer Command</command>
		<command tag="close printing">close printing Command</command>
		<command tag="revBrowserPrint">revBrowserPrint Command</command>
		<command tag="answer page setup">answer page setup Command</command>
		<command tag="cancel printing">cancel printing Command</command>
		<command tag="open printing">open printing Command</command>
		<command tag="print link">print link Command</command>
		<command tag="print anchor">print anchor Command</command>
		<command tag="print bookmark">print bookmark Command</command>
		<property tag="printRowsFirst">printRowsFirst Property</property>
		<property tag="printTitle">printTitle Property</property>
	</references>

	<description>
	<overview>Use the <b>open printing to pdf</b> <glossary tag="command">command</glossary> to print multiple cards directly to a pdf file.</overview>

		<parameters>
		<parameter>The <i>filename </i>is the path to the PDF file to be created.</parameter>
		<parameter>The <i>optionArray</i> is an optional array allowing entries to be added to the resulting PDF's Documemt Information Dictionary.</parameter>
		</parameters>

	<value></value>
	<comments>
The <b>open printing to pdf </b>command starts a print loop that outputs directly to a PDF file rather that the currently configured printer.
<p></p>
<p>The following handler prints cards that have been collected in a global variable:</p><p></p><p>  on printSomeCards</p><p>    global cardsToPrint</p><p>    open printing to pdf &quot;test.pdf&quot;</p><p>    if the result is &quot;Cancel&quot; then exit printSomeCards</p><p>    repeat with x = 1 to the number of lines of cardsToPrint</p><p>      print card (line x of cardsToPrint)</p><p>    end repeat</p><p>    close printing -- send group of cards to printer</p><p>  end printSomeCards</p><p></p><p></p><note>It is not necessary to set the <property tag="formatForPrinting">formatForPrinting</property> option on stacks which are being printed to PDF.</note><p></p><p>The options array which can be optionally specified when opening a print loop for pdf allows you to add entries to the resulting PDF's Document Information Dictionary.</p><p></p><p>The following keys are supported:</p><p>&#9;Title, Author, Subject, Keywords, Creator, Producer</p><p>Their values can be any string.</p><p></p><p></p><important>The implementation of pdf printing resides in a dynamic library called revpdfprinter. The standalone builder will automatically include this in the appropriate place when building standalones.</important><p></p><p>Any custom code that deals with standalones which use this feature must make sure that the revpdfprinter library resides next to the engine executable.</p></comments>
	</description>
</doc>