<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
<refentry xml:id="function.ps-open-file" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>ps_open_file</refname>
  <refpurpose>Opens a file for output</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>ps_open_file</methodname>
   <methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
  </methodsynopsis>
  <para>
   Creates a new file on disk and writes the PostScript document into it. The
   file will be closed when <function>ps_close</function> is called.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>psdoc</parameter></term>
     <listitem>
      <para>
       Resource identifier of the postscript file
       as returned by <function>ps_new</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>filename</parameter></term>
     <listitem>
      <para>
       The name of the postscript file.
       If <parameter>filename</parameter> is not passed the document will be
       created in memory and all output will go straight to the browser.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>ps_close</function></member>
   </simplelist>
  </para>
 </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:"~/.phpdoc/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
-->

