mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
128 lines
4.7 KiB
HTML
128 lines
4.7 KiB
HTML
<!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>Sets information fields of document</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.ps-set-info" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">ps_set_info</h1>
|
||
<p class="verinfo">(PECL ps >= 1.1.0)</p><p class="refpurpose"><span class="refname">ps_set_info</span> — <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">resource</span> <code class="parameter">$p</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$val</code></span>
|
||
) : <span class="type">bool</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 <em>BoundingBox</em> is usually set to the value given to the
|
||
first page. This only works if <span class="function"><a href="ps_findfont.html" 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="ps_findfont.html" 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="ps_new.html" 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 <em>Keywords</em>, <em>Subject</em>,
|
||
<em>Title</em>, <em>Creator</em>,
|
||
<em>Author</em>, <em>BoundingBox</em>, and
|
||
<em>Orientation</em>. 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
|
||
<em>Orientation</em> can be set to either
|
||
<em>Portrait</em> or <em>Landscape</em>. The
|
||
<em>BoundingBox</em> 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">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="ps_begin_page.html" class="function">ps_begin_page()</a></span>,
|
||
unless <span class="function"><a href="ps_findfont.html" 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>TRUE</code></strong>, 或者在失败时返回 <strong><code>FALSE</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 class="member"><span class="function"><a href="ps_findfont.html" class="function" rel="rdfs-seeAlso">ps_findfont()</a> - Loads a font</span></li>
|
||
<li class="member"><span class="function"><a href="ps_begin_page.html" class="function" rel="rdfs-seeAlso">ps_begin_page()</a> - Start a new page</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
</div></div></div></body></html> |