Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5527

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Output text in a box</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ps-shfill.html">ps_shfill</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ps-show-xy2.html">ps_show_xy2</a></div>
 <div class="up"><a href="ref.ps.html">PS Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.ps-show-boxed" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_show_boxed</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_show_boxed</span> &mdash; <span class="dc-title">Output text in a box</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ps-show-boxed-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>ps_show_boxed</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$psdoc</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$text</code></span>
   , <span class="methodparam"><span class="type">float</span> <code class="parameter">$left</code></span>
   , <span class="methodparam"><span class="type">float</span> <code class="parameter">$bottom</code></span>
   , <span class="methodparam"><span class="type">float</span> <code class="parameter">$width</code></span>
   , <span class="methodparam"><span class="type">float</span> <code class="parameter">$height</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$hmode</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$feature</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   Outputs a text in a given box. The lower left corner of the box is at
   (<em><code class="parameter">left</code></em>, <em><code class="parameter">bottom</code></em>). Line breaks
   will be inserted where needed. Multiple spaces are treated as one.
   Tabulators are treated as spaces.
  </p>
  <p class="para">
   The text will be hyphenated if the parameter
   <em><code class="parameter">hyphenation</code></em> is set to <strong><code>TRUE</code></strong>
   and the parameter <em><code class="parameter">hyphendict</code></em> contains a valid
   filename for a hyphenation
   file. The line spacing is taken from the value <em>leading</em>.
   Paragraphs can be
   separated by an empty line just like in TeX. If the value
   <em>parindent</em> is
   set to value &gt; 0.0 then the first n lines will be indented. The number n
   of lines is set by the parameter <em>numindentlines</em>.
   In order to prevent
   indenting of the first m paragraphs set the value
   <em>parindentskip</em> to a
   positive number.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-show-boxed-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">psdoc</code></em></span>
     <dd>

      <p class="para">
       Resource identifier of the postscript file
       as returned by  <span class="function"><a href="function.ps-new.html" class="function">ps_new()</a></span>.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">text</code></em></span>
     <dd>

      <p class="para">
       The text to be output into the given box.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">left</code></em></span>
     <dd>

      <p class="para">
       x-coordinate of the lower left corner of the box.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">bottom</code></em></span>
     <dd>

      <p class="para">
       y-coordinate of the lower left corner of the box.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">width</code></em></span>
     <dd>

      <p class="para">
       Width of the box.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">height</code></em></span>
     <dd>

      <p class="para">
       Height of the box.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">hmode</code></em></span>
     <dd>

      <p class="para">
       The parameter <em><code class="parameter">hmode</code></em> can be &quot;justify&quot;,
       &quot;fulljustify&quot;, &quot;right&quot;, &quot;left&quot;, or &quot;center&quot;. The difference of
       &quot;justify&quot; and &quot;fulljustify&quot; just affects the last line of the box. In
       fulljustify mode the last line will be left and right justified unless
       this is also the last line of paragraph. In justify mode it will always
       be left justified.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">feature</code></em></span>
     <dd>

      <p class="para">
       
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 unknown-parametert" id="refsect1-function.ps-show-boxed-unknown-parametert">
  <h3 class="title">Used parameters</h3>
  <p class="para">
   The output of  <span class="function"><strong>ps_show_boxed()</strong></span> can be configured with
   several parameters and values which must be set with either
    <span class="function"><a href="function.ps-set-parameter.html" class="function">ps_set_parameter()</a></span> or  <span class="function"><a href="function.ps-set-value.html" class="function">ps_set_value()</a></span>.
   Beside the parameters and values which affect text output, the following
   parameters and values are evaluated.
   <dl>

    <dt>

     <span class="term">leading (value)</span>
     <dd>

      <p class="para">Distance between baselines of two consecutive lines.</p>
     </dd>

    </dt>

    <dt>

     <span class="term">linebreak (parameter)</span>
     <dd>

      <p class="para">
       Set to &quot;true&quot; if you want a carriage return to start a new line instead
       of treating it as a space. Defaults to &quot;false&quot;.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">parbreak (parameter)</span>
     <dd>

      <p class="para">
       Set to &quot;true&quot; if you want a carriage return on a single line to start a
       new paragraph instead of treating it as a space. Defaults to &quot;true&quot;.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">hyphenation (parameter)</span>
     <dd>

      <p class="para">
       Set to &quot;true&quot; in order to turn hyphenation on. This requires a
       dictionary to be set with the parameter &quot;hyphendict&quot;. Defaults to
       &quot;false&quot;.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">hyphendict (parameter)</span>
     <dd>

      <p class="para">
       Filename of the dictionary used for hyphenation pattern (see below).
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">hyphenminchar (value)</span>
     <dd>

      <p class="para">
       The number of chars which must at least be left over before or after
       the hyphen. This implies that only words of at least two times this
       value will be hyphenated. The default value is three. Setting a value
       of zero will result in the default value.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">parindent (value)</span>
     <dd>

      <p class="para">
       Set the amount of space in pixel for indenting the first m lines of a
       paragraph. m can be set with the value &quot;numindentlines&quot;.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">parskip (value)</span>
     <dd>

      <p class="para">
       Set the amount of extra space in pixel between paragraphs. Defaults to
       0 which will result in a normal line distance.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">numindentlines (value)</span>
     <dd>

      <p class="para">
       Number of lines from the start of the paragraph which will be indented.
       Defaults to 1.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">parindentskip (value)</span>
     <dd>

      <p class="para">
       Number of paragraphs in the box whose first lines will not be indented.
       This defaults to 0. This is useful for paragraphs right after a section
       heading or text being continued in a second box. In both case one would
       set this to 1.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">linenumbermode (parameter)</span>
     <dd>

      <p class="para">
       Set how lines are to be numbered. Possible values are &quot;box&quot; for
       numbering lines in the whole box or &quot;paragraph&quot; to number lines within
       each paragraph.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">linenumberspace (value)</span>
     <dd>

      <p class="para">
       The space for the column left of the numbered line containing the line
       number. The line number will be right justified into this column.
       Defaults to 20.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">linenumbersep (value)</span>
     <dd>

      <p class="para">
       The space between the column with line numbers and the line itself.
       Defaults to 5.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 unknown-unknown-parameteru" id="refsect1-function.ps-show-boxed-unknown-unknown-parameteru">
  <h3 class="title">Hyphenation</h3>
  <p class="para">
   Text is hyphenated if the parameter <em>hyphenation</em> is set
   to true and a valid hyphenation dictionary is set. pslib does not ship its own
   hyphenation dictionary but uses one from openoffice, scribus or koffice.
   You can find their dictionaries for different languages in one of the
   following directories if the software is installed:
   <ul class="simplelist">
    <li class="member">
     <var class="filename">/usr/share/apps/koffice/hyphdicts/</var>
    </li>
    <li class="member">
     <var class="filename">/usr/lib/scribus/dicts/</var>
    </li>
    <li class="member">
     <var class="filename">/usr/lib/openoffice/share/dict/ooo/</var>
    </li>
   </ul>
   Currently scribus appears to have the most complete hyphenation
   dictionaries.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-show-boxed-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Number of characters that could not be written.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-show-boxed-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.ps-continue-text.html" class="function" rel="rdfs-seeAlso">ps_continue_text()</a> - Continue text in next line</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ps-shfill.html">ps_shfill</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ps-show-xy2.html">ps_show_xy2</a></div>
 <div class="up"><a href="ref.ps.html">PS Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>