mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
117 lines
5.8 KiB
HTML
117 lines
5.8 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>Set PDF document to display FDF data in</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.fdf-set-file" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">fdf_set_file</h1>
|
||
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">fdf_set_file</span> — <span class="dc-title">Set PDF document to display FDF data in</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.fdf-set-file-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>fdf_set_file</strong></span>
|
||
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$fdf_document</code></span>
|
||
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$url</code></span>
|
||
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$target_frame</code></span>
|
||
] ) : <span class="type">bool</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
Selects a different PDF document to display the form results in then the
|
||
form it originated from.
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.fdf-set-file-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">fdf_document</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
The FDF document handle, returned by <span class="function"><a href="fdf_create.html" class="function">fdf_create()</a></span>,
|
||
<span class="function"><a href="fdf_open.html" class="function">fdf_open()</a></span> or <span class="function"><a href="fdf_open_string.html" class="function">fdf_open_string()</a></span>.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">url</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
Should be given as an absolute URL.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">target_frame</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
Use this parameter to specify the frame in which the document will be
|
||
displayed. You can also set the default value for this parameter using
|
||
<span class="function"><a href="fdf_set_target_frame.html" class="function">fdf_set_target_frame()</a></span>.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.fdf-set-file-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
成功时返回 <strong><code>TRUE</code></strong>, 或者在失败时返回 <strong><code>FALSE</code></strong>。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.fdf-set-file-examples">
|
||
<h3 class="title">范例</h3>
|
||
<p class="para">
|
||
<div class="example" id="example-4156">
|
||
<p><strong>Example #1 Passing FDF data to a second form</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br /> </span><span style="color: #FF8000">/* set content type for Adobe FDF */<br /> </span><span style="color: #0000BB">fdf_header</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/* start new fdf */<br /> </span><span style="color: #0000BB">$fdf </span><span style="color: #007700">= </span><span style="color: #0000BB">fdf_create</span><span style="color: #007700">();<br /><br /> </span><span style="color: #FF8000">/* set field "foo" to value "bar" */<br /> </span><span style="color: #0000BB">fdf_set_value</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdf</span><span style="color: #007700">, </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">, </span><span style="color: #DD0000">"bar"</span><span style="color: #007700">);<br /><br /> </span><span style="color: #FF8000">/* tell client to display FDF data using "fdf_form.pdf" */<br /> </span><span style="color: #0000BB">fdf_set_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdf</span><span style="color: #007700">, </span><span style="color: #DD0000">"http://www.example.com/fdf_form.pdf"</span><span style="color: #007700">);<br /><br /> </span><span style="color: #FF8000">/* output fdf */<br /> </span><span style="color: #0000BB">fdf_save</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdf</span><span style="color: #007700">);<br /><br /> </span><span style="color: #FF8000">/* clean up */<br /> </span><span style="color: #0000BB">fdf_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$fdf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
</div>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 seealso" id="refsect1-function.fdf-set-file-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><span class="function"><a href="fdf_get_file.html" class="function" rel="rdfs-seeAlso">fdf_get_file()</a> - Get the value of the /F key</span></li>
|
||
<li class="member"><span class="function"><a href="fdf_set_target_frame.html" class="function" rel="rdfs-seeAlso">fdf_set_target_frame()</a> - Set target frame for form display</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |