<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.ps-begin-page.php',
    1 => 'ps_begin_page',
    2 => 'Start a new page',
  ),
  'up' => 
  array (
    0 => 'ref.ps.php',
    1 => 'PS Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.ps-arcn.php',
    1 => 'ps_arcn',
  ),
  'next' => 
  array (
    0 => 'function.ps-begin-pattern.php',
    1 => 'ps_begin_pattern',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ps/functions/ps-begin-page.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ps-begin-page" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_begin_page</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_begin_page</span> &mdash; <span class="dc-title">Start a new page</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ps-begin-page-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ps_begin_page</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.float.php" class="type float">float</a></span> <code class="parameter">$width</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$height</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Starts a new page. Although the parameters <code class="parameter">width</code>
   and <code class="parameter">height</code> imply a different page size for each
   page, this is not possible in PostScript. The first call of
   <span class="function"><strong>ps_begin_page()</strong></span> will set the page size for the whole
   document. Consecutive calls will have no effect, except for creating a new
   page. The situation is different if you intent to convert the PostScript
   document into PDF. This function places pdfmarks into the document which
   can set the size for each page indiviually. The resulting PDF document will
   have different page sizes.
  </p>
  <p class="para">
   Though PostScript does not know different page sizes, pslib places
   a bounding box for each page into the document. This size is evaluated
   by some PostScript viewers and will have precedence over the BoundingBox
   in the Header of the document. This can lead to unexpected results when
   you set a BoundingBox whose lower left corner is not (0, 0), because the
   bounding box of the page will always have a lower left corner (0, 0)
   and overwrites the global setting.
  </p>
  <p class="para">
   Each page is encapsulated into save/restore. This means, that most of the
   settings made on one page will not be retained on the next page.
  </p>
  <p class="para">
   If there is up to the first call of <span class="function"><strong>ps_begin_page()</strong></span> no
   call of <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span>, then the header of the PostScript
   document will be output and the bounding box will be set to the size of
   the first page. The lower left corner of the bounding box is set to (0, 0).
   If <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span> was called before, then the
   header has been output already, and the document will not have a valid
   bounding box. In order to prevent this, one should call
   <span class="function"><a href="function.ps-set-info.php" class="function">ps_set_info()</a></span> to set the info field
   <code class="literal">BoundingBox</code> and possibly <code class="literal">Orientation</code>
   before any <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span> or
   <span class="function"><strong>ps_begin_page()</strong></span> calls.
  </p>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    Up to version 0.2.6 of pslib, this function will always overwrite
    the BoundingBox and Orientation, if it has been set before with
    <span class="function"><a href="function.ps-set-info.php" class="function">ps_set_info()</a></span> and <span class="function"><a href="function.ps-findfont.php" class="function">ps_findfont()</a></span>
    has not been called before.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-begin-page-parameters">
  <h3 class="title">Elenco dei parametri</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">width</code></dt>
     <dd>
      <p class="para">
       The width of the page in pixel, e.g. 596 for A4 format.
      </p>
     </dd>
    
    
     <dt><code class="parameter">height</code></dt>
     <dd>
      <p class="para">
       The height of the page in pixel, e.g. 842 for A4 format.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-begin-page-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-begin-page-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ps-end-page.php" class="function" rel="rdfs-seeAlso">ps_end_page()</a> - End a page</span></li>
    <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-set-info.php" class="function" rel="rdfs-seeAlso">ps_set_info()</a> - Sets information fields of document</span></li>
   </ul>
  </p>
 </div>

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