<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ps.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.ps-set-info.php',
    1 => 'ps_set_info',
    2 => 'Sets information fields of document',
  ),
  'up' => 
  array (
    0 => 'ref.ps.php',
    1 => 'PS 函数',
  ),
  'prev' => 
  array (
    0 => 'function.ps-set-border-style.php',
    1 => 'ps_set_border_style',
  ),
  'next' => 
  array (
    0 => 'function.ps-set-parameter.php',
    1 => 'ps_set_parameter',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ps/functions/ps-set-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ps-set-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_set_info</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_set_info</span> &mdash; <span class="dc-title">Sets information fields of document</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ps-set-info-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ps_set_info</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$psdoc</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Sets certain information fields of the document. This fields will be shown
   as a comment in the header of the PostScript file. If the document is
   converted to pdf this fields will also be used for the document
   information.
  </p>
  <p class="para">
   The <code class="literal">BoundingBox</code> is usually set to the value given to the
   first page. This only works if <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span> has not
   been called before. In such cases the BoundingBox would be left unset
   unless you set it explicitly with this function.
  </p>
  <p class="para">
   This function will have no effect anymore when the header of the postscript
   file has been already written. It must be called before the first page
   or the first call of <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-set-info-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">psdoc</code></dt>
     <dd>
      <p class="para">
       Resource identifier of the postscript file
       as returned by <span class="function"><a href="function.ps-new.php" class="function">ps_new()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       The name of the information field to set. The values which can be
       set are <code class="literal">Keywords</code>, <code class="literal">Subject</code>,
       <code class="literal">Title</code>, <code class="literal">Creator</code>,
       <code class="literal">Author</code>, <code class="literal">BoundingBox</code>, and
       <code class="literal">Orientation</code>. Be aware that some of them has a
       meaning to PostScript viewers.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value of the information field. The field
       <code class="literal">Orientation</code> can be set to either
       <code class="literal">Portrait</code> or <code class="literal">Landscape</code>. The
       <code class="literal">BoundingBox</code> is a string consisting of four numbers.
       The first two numbers are the coordinates of the lower left corner of
       the page. The last two numbers are the coordinates of the upper
       right corner.
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <p class="para">
        Up to version 0.2.6 of pslib, the BoundingBox and Orientation
        will be overwritten by <span class="function"><a href="function.ps-begin-page.php" class="function">ps_begin_page()</a></span>,
        unless <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span> has been called before.
       </p>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-set-info-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-set-info-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ps-findfont.php" class="function" rel="rdfs-seeAlso">ps_findfont()</a> - Loads a font</span></li>
    <li><span class="function"><a href="function.ps-begin-page.php" class="function" rel="rdfs-seeAlso">ps_begin_page()</a> - Start a new page</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>