php-doc-en/reference/printer/functions/printer-get-option.xml
2003-12-15 16:55:22 +00:00

70 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/printer.xml, last change in rev 1.6 -->
<refentry id="function.printer-get-option">
<refnamediv>
<refname>printer_get_option</refname>
<refpurpose>Retrieve printer configuration data</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>printer_get_option</methodname>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
<methodparam><type>string</type><parameter>option</parameter></methodparam>
</methodsynopsis>
<para>
The function retrieves the configuration setting of <parameter>option</parameter>.
<parameter>handle</parameter> must be a valid handle to a printer.
Take a look at <function>printer_set_option</function> for the settings that can
be retrieved, additionally the following settings can be retrieved:
<itemizedlist>
<listitem>
<simpara>
<parameter>PRINTER_DEVICENAME</parameter>
returns the devicename of the printer.
</simpara>
</listitem>
<listitem>
<simpara>
<parameter>PRINTER_DRIVERVERSION</parameter>
returns the printer driver version.
</simpara>
</listitem>
</itemizedlist>
</para>
<example>
<title><function>printer_get_option</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$handle = printer_open();
echo printer_get_option($handle, PRINTER_DRIVERVERSION);
printer_close($handle);
?>
]]>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->