new functions, getting up-to-date with current CVS, examples ...

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@100501 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2002-10-21 20:57:18 +00:00
parent 26b40435b4
commit 44563c057f
31 changed files with 1118 additions and 318 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<section id="fdf.constants">
&reftitle.constants;
&extension.constants;
@ -265,6 +265,39 @@
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>FDFNormalAP</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>FDFRolloverAP</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>FDFDownAP</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.12 -->
<refentry id='function.fdf-add-doc_javascript'>
<refnamediv>
<refname>fdf_add_doc_javascript</refname>
<refpurpose>Adds javascript code to the FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_add_doc_javascript</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>script_name</parameter></methodparam>
<methodparam><type>string</type><parameter>script_code</parameter></methodparam>
</methodsynopsis>
<para>
Adds a script to the FDF, which Acrobat then adds to the doc-level
scripts of a document, once the FDF is imported into it. It is strongly
suggested to use '\r' for linebreaks within <parameter>script_code</parameter>.
</para>
<para>
<example>
<title>Adding JavaScript code to a FDF</title>
<programlisting>
<![CDATA[
<?php
$fdf = fdf_create();
fdf_add_doc_javascript($fdf, "PlusOne", "function PlusOne(x)\r{\r return x+1;\r}\r");
fdf_save($fdf);
?>
]]>
</programlisting>
<simpara>will create a FDF like this:</simpara>
<screen>
<![CDATA[
%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF << /JavaScript << /Doc [ (PlusOne)(function PlusOne\(x\)\r{\r return x+1;\r}\r)] >> >>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
]]>
</screen>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-close">
<refnamediv>
@ -10,7 +10,7 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_close</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_close</function> function closes the FDF document.</para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-create">
<refnamediv>
@ -9,7 +9,7 @@
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_create</methodname>
<type>resource</type><methodname>fdf_create</methodname>
<void/>
</methodsynopsis>
<para>

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-errno">
<refnamediv>
<refname>fdf_errno</refname>
<refpurpose>Return error code for last fdf operation</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_errno</methodname>
<void/>
</methodsynopsis>
<para>
<function>fdf_errno</function> returns the error code set by
the last <function>fdf_...</function> function call. This is zero
for a successfull operation or a non-zero error code on failure.
A textual description may be obtained using the
<function>fdf_error</function> function.
</para>
<para>
See also <function>fdf_error</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-error">
<refnamediv>
<refname>fdf_error</refname>
<refpurpose>Return error description for fdf error code</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_error</methodname>
<methodparam choice='opt'><type>int</type><parameter>error_code</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_error</function> returns a textual description for
the fdf error code given in <parameter>error_code</parameter>.
The function uses the internal error code set by the last operation
if no <parameter>error_code</parameter> is given, so
<literal>fdf_error()</literal> is a convenient shortcut for
<literal>fdf_error(fdf_errno())</literal>.
</para>
<para>
See also <function>fdf_errno</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-ap">
<refnamediv>
<refname>fdf_get_ap</refname>
<refpurpose>Get the appearance of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_get_ap</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>field</parameter></methodparam>
<methodparam><type>int</type><parameter>face</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_ap</function> function gets the
appearance of a <parameter>field</parameter> (i.e. the value of the /AP key) and
stores it in a file. The possible values of <parameter>face</parameter>
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant> and
<constant>FDFDownAP</constant>. The appearance is stored in
<parameter>filename</parameter>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-get-attachment">
<refnamediv>
<refname>fdf_get_attachment</refname>
<refpurpose>Extracts uploaded file embedded in the FDF</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>fdf_get_attachment</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>string</type><parameter>savepath</parameter></methodparam>
</methodsynopsis>
<para>
Extracts a file uploaded by means of the "file selection" field
<parameter>fieldname</parameter> and stores it under
<parameter>savepath</parameter>. <parameter>savepath</parameter> may be
the name of a plain file or an existing directory in which the file is to be created
under its original name. Any existing file under the same name will be overwritten.
</para>
<note>
<para>
There seems to be no other way to find out the original filename but to store
the file using a directory as <parameter>savepath</parameter> and check
for the basename it was stored under.
</para>
</note>
<para>
The returned array contains the following fields:
<itemizedlist>
<listitem>
<simpara><parameter>path</parameter> - path were the file got stored</simpara>
<simpara><parameter>size</parameter> - size of the stored file in bytes</simpara>
<simpara><parameter>type</parameter> - mimetype if given in the FDF</simpara>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title>Storing an uploaded file</title>
<programlisting>
<![CDATA[
<?php
$fdf = fdf_open_string($HTTP_FDF_DATA);
$data = fdf_get_attachment($fdf, "filename", "/tmpdir");
echo "The uploaded file is stored in $data[path]";
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-get-encoding">
<refnamediv>
<refname>fdf_get_encoding</refname>
<refpurpose>Get the value of the /Encoding key</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_encoding</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_encoding</function> returns the value
of the /Encoding key. An empty string is returned if the default
PDFDocEncoding/Unicode scheme is used.
</para>
<para>
See also <function>fdf_set_encoding</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,26 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-file">
<refnamediv>
<refname>fdf_get_file</refname>
<refpurpose>Get the value of the /F key</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_file</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_file</function> returns the value
of the /F key.</para>
<para>
See also <function>fdf_set_file</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-get-file">
<refnamediv>
<refname>fdf_get_file</refname>
<refpurpose>Get the value of the /F key</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_file</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_file</function> returns the value
of the /F key.
</para>
<para>
See also <function>fdf_set_file</function>.</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-status">
<refnamediv>
<refname>fdf_get_status</refname>
<refpurpose>Get the value of the /STATUS key</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_status</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_status</function> returns the value
of the /STATUS key.</para>
<para>
See also <function>fdf_set_status</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-get-status">
<refnamediv>
<refname>fdf_get_status</refname>
<refpurpose>Get the value of the /STATUS key</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_status</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_status</function> returns the value
of the /STATUS key.
</para>
<para>
See also <function>fdf_set_status</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,27 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-value">
<refnamediv>
<refname>fdf_get_value</refname>
<refpurpose>Get the value of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_value</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_value</function> function returns the
value of a field.</para>
<para>
See also <function>fdf_set_value</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-get-value">
<refnamediv>
<refname>fdf_get_value</refname>
<refpurpose>Get the value of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_value</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>which</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_get_value</function> function returns the
value for the requested <parameter>fieldname</parameter>.
</para>
<para>
Elements of an array field can be retrieved by passing the optional
<parameter>which</parameter>, starting at zero. For non-array fields
the optional parameter <parameter>which</parameter> will be ignored.
</para>
<note>
<para>
Array support and optional <parameter>which</parameter> parameter
were added in PHP 4.3.
</para>
</note>
<para>
See also <function>fdf_set_value</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-get-version">
<refnamediv>
<refname>fdf_get_version</refname>
<refpurpose>Gets version number for FDF api or file </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_get_version</methodname>
<methodparam choice='opt'><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
This function will return the fdf version for the given
<parameter>fdf_document</parameter>, or the toolkit api
version number if no parameter is given.
</para>
<para>
For the current FDF toolkit 5.0 the api version number is '5.0'
and the document version number is either '1.2', '1.3' or '1.4'.
</para>
<para>
See also <function>fdf_set_version</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,30 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-next-field-name">
<refnamediv>
<refname>fdf_next_field_name</refname>
<refpurpose>Get the next field name</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_next_field_name</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>fieldname</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_next_field_name</function> function returns the
name of the field after the field in
<parameter>fieldname</parameter> or the field name of the first field
if the second parameter is &null;.</para>
<para>
See also <function>fdf_set_value</function>,
<function>fdf_get_value</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-next-field-name">
<refnamediv>
<refname>fdf_next_field_name</refname>
<refpurpose>Get the next field name</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_next_field_name</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>fieldname</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_next_field_name</function> function returns the
name of the field after the field in
<parameter>fieldname</parameter> or the field name of the first field
if the second parameter is &null;.
</para>
<para>
<example>
<title>Detecting all fieldnames in a FDF</title>
<programlisting>
<![CDATA[
<?php
$fdf = fdf_open($HTTP_FDF_DATA);
for($field = fdf_next_field_name($fdf);
$field != "";
$field = fdf_next_field_name($fdf, $field)) {
echo "field: $field\n";
}
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>fdf_enum_fields</function> and
<function>fdf_get_value</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-open-string">
<refnamediv>
<refname>fdf_open_string</refname>
<refpurpose>Read a FDF document from a string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>fdf_open</methodname>
<methodparam><type>string</type><parameter>fdf_data</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_open_string</function> function reads form data
from a string. <parameter>fdf_data</parameter> must contain the data
as returned from a PDF form or created using <function>fdf_create</function>
and <function>fdf_save_string</function>.
</para>
<para>
You can <function>fdf_open_string</function> together with
<varname>$HTTP_FDF_DATA</varname> to process fdf form input
from a remote client.
</para>
<para>
<example>
<title>Accessing the form data</title>
<programlisting>
<![CDATA[
<?php
$fdf = fdf_open_string($HTTP_FDF_DATA);
...
fdf_close($fdf);
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>fdf_open</function>,
<function>fdf_close</function>,
<function>fdf_create</function> and
<function>fdf_save_string</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,30 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-open">
<refnamediv>
<refname>fdf_open</refname>
<refpurpose>Open a FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_open</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_open</function> function opens
a file with form data. This file must contain the data as returned
from a PDF form. Currently, the file has to be created 'manually'
by using <function>fopen</function> and writing the content
of HTTP_FDF_DATA with <function>fwrite</function> into it.
A mechanism like for HTML form data where for each input
field a variable is created does not exist.</para>
<para>
<example>
<title>Accessing the form data</title>
<programlisting>
<refentry id="function.fdf-open">
<refnamediv>
<refname>fdf_open</refname>
<refpurpose>Open a FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>fdf_open</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_open</function> function opens
a file with form data. This file must contain the data as returned
from a PDF form or created using <function>fdf_create</function> and
<function>fdf_save</function>.
</para>
<para>
You can process the results of a PDF form POST request by writing
the data recieved in <varname>$HTTP_FDF_DATA</varname> to a file
and open it using <function>fdf_open</function>. Starting with PHP 4.3
you can also use <function>fdf_open_string</function> which handles temporary
file creation and cleanup for you.
</para>
<para>
<example>
<title>Accessing the form data</title>
<programlisting>
<![CDATA[
<?php
// Save the FDF data into a temp file
@ -38,14 +42,18 @@ $fdf = fdf_open("test.fdf");
fdf_close($fdf);
?>
]]>
</programlisting>
</example></para>
<para>
See also <function>fdf_close</function>.</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also
<function>fdf_open_string</function>,
<function>fdf_close</function>,
<function>fdf_create</function> and
<function>fdf_save</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-save-string">
<refnamediv>
<refname>fdf_save_string</refname>
<refpurpose>Returns the FDF document as a string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_save_string</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_save_string</function> function returns the FDF document as a string.
</para>
<para>
<example>
<title>Retrieving FDF as a string</title>
<programlisting>
<![CDATA[
<?php
$fdf = fdf_create();
fdf_set_value($fdf, "foo", "bar");
$str = fdf_save_string($fdf);
fdf_close($fdf);
echo $str;
?>
]]>
</programlisting>
<para>
will output something like
</para>
<screen>
<![CDATA[
%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF << /Fields 2 0 R >>
>>
endobj
2 0 obj
[
<< /T (foo)/V (bar)>>
]
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
]]>
</screen>
</example>
</para>
<para>
See also <function>fdf_save</function>,
<function>fdf_open_string</function>,
<function>fdf_create</function> and
<function>fdf_close</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,32 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-save">
<refnamediv>
<refname>fdf_save</refname>
<refpurpose>Save a FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_save</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_save</function> function saves
a FDF document.
The FDF Toolkit provides a way to output the document to stdout if
the parameter <parameter>filename</parameter>
is '.'. This does not work if PHP is used as an apache module.
In such a case one will have to write to a file and use e.g.
<function>fpassthru</function> to output it.</para>
<para>
See also <function>fdf_close</function> and example for
<function>fdf_create</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-save">
<refnamediv>
<refname>fdf_save</refname>
<refpurpose>Save a FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_save</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_save</function> function saves a FDF document.
The resulting FDF will be written to <parameter>filename</parameter>.
Without a <parameter>filename</parameter> <function>fdf_save</function>
will write the FDF to the default PHP output stream.
</para>
<para>
See also <function>fdf_save_string</function>,
<function>fdf_create</function> and
<function>fdf_close</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,29 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-ap">
<refnamediv>
<refname>fdf_set_ap</refname>
<refpurpose>Set the appearance of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_ap</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>field_name</parameter></methodparam>
<methodparam><type>int</type><parameter>face</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>int</type><parameter>page_number</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_ap</function> function sets the
appearance of a field (i.e. the value of the /AP key).
The possible values of <parameter>face</parameter>
are 1=FDFNormalAP, 2=FDFRolloverAP, 3=FDFDownAP.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-set-ap">
<refnamediv>
<refname>fdf_set_ap</refname>
<refpurpose>Set the appearance of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_ap</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>field_name</parameter></methodparam>
<methodparam><type>int</type><parameter>face</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>int</type><parameter>page_number</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_ap</function> function sets the
appearance of a field (i.e. the value of the /AP key).
The possible values of <parameter>face</parameter>
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant>
and <constant>FDFDownAP</constant>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,32 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.24 -->
<refentry id="function.fdf-set-encoding">
<refnamediv>
<refname>fdf_set_encoding</refname>
<refpurpose>Sets FDF character encoding</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_encoding</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<refentry id="function.fdf-set-encoding">
<refnamediv>
<refname>fdf_set_encoding</refname>
<refpurpose>Sets FDF character encoding</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_encoding</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_set_encoding</function> sets the character
encoding in FDF document <parameter>fdf_document</parameter>.
<parameter>encoding</parameter> should be the valid encoding
name. The valid encoding name in Acrobat 5.0 are
"<literal>Shift-JIS</literal>", "<literal>UHC</literal>",
"<literal>GBK</literal>","<literal>BigFive</literal>".
</para>
<para>
The <function>fdf_set_encoding</function> is available in
PHP 4.1.0 or later.
</para>
</refsect1>
</refentry>
</methodsynopsis>
<para>
<function>fdf_set_encoding</function> sets the character
encoding in FDF document <parameter>fdf_document</parameter>.
<parameter>encoding</parameter> should be the valid encoding
name. Currently the following values are supported:
"<literal>Shift-JIS</literal>", "<literal>UHC</literal>",
"<literal>GBK</literal>","<literal>BigFive</literal>".
An empty string resets the encoding to the default PDFDocEncoding/Unicode
scheme.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,30 +1,62 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-file">
<refnamediv>
<refname>fdf_set_file</refname>
<refpurpose>Set the value of the /F key</refpurpose>
<refentry id="function.fdf-set-file">
<refnamediv>
<refname>fdf_set_file</refname>
<refpurpose>Set PDF document to display FDF data in</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_file</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_file</function> sets the value
of the /F key. The /F key is just a reference to a PDF form
which is to be populated with data.
In a web environment it is a URL (e.g. http:/testfdf/resultlabel.pdf).</para>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_file</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>target_frame</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_file</function> selects a different PDF
document to display the form results in then the form it originated
from. The <parameter>url</parameter> needs to be given as an
absolute URL.
</para>
<para>
The frame to display the document in may be selected using the optional
parameter <parameter>target_frame</parameter> or the function
<function>fdf_set_target_frame</function>.
</para>
<example>
<title>Passing FDF data to a second form</title>
<programlisting>
<![CDATA[
<?php
/* set content type for Adobe FDF */
fdf_header();
<para>
See also <function>fdf_get_file</function> and example for
<function>fdf_create</function>.</para>
/* start new fdf */
$fdf = fdf_create();
/* set field "foo" to value "bar" */
$fdf_set_value($fdf, "foo", "bar");
</refsect1>
</refentry>
/* tell client to display FDF data using "fdf_form.pdf" */
fdf_set_file($fdf, "http://www.example.com/fdf_form.pdf");
/* output fdf */
fdf_save();
/* clean up */
fdf_close();
?>
]]>
</programlisting>
</example>
<para>
See also <function>fdf_get_file</function> and
<function>fdf_set_target_frame</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-flags">
<refnamediv>
@ -10,7 +10,7 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_flags</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>whichFlags</parameter></methodparam>
<methodparam><type>int</type><parameter>newFlags</parameter></methodparam>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-javascript-action">
<refnamediv>
@ -10,7 +10,7 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_javascript_action</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>trigger</parameter></methodparam>
<methodparam><type>string</type><parameter>script</parameter></methodparam>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-opt">
<refnamediv>
@ -10,7 +10,7 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_opt</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>element</parameter></methodparam>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>

View file

@ -1,27 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-status">
<refnamediv>
<refname>fdf_set_status</refname>
<refentry id="function.fdf-set-status">
<refnamediv>
<refname>fdf_set_status</refname>
<refpurpose>Set the value of the /STATUS key</refpurpose>
</refnamediv>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_status</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_status</function> sets the value
of the /STATUS key.</para>
<para>
See also <function>fdf_get_status</function>.</para>
</refsect1>
</refentry>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_status</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_status</function> sets the value
of the /STATUS key. When a client recieves a FDF with a status set
it will present the value in an alert box.
</para>
<para>
See also <function>fdf_get_status</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-submit-form-action">
<refnamediv>
<refname>fdf_set_submit_form_action</refname>
<refpurpose>Sets a submit form action of a field</refpurpose>
</refnamediv>
<refentry id="function.fdf-set-submit-form-action">
<refnamediv>
<refname>fdf_set_submit_form_action</refname>
<refpurpose>Sets a submit form action of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_submit_form_action</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>trigger</parameter></methodparam>
<methodparam><type>string</type><parameter>script</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_submit_form_action</function> sets a submit form
action for the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_javascript_action</function>.
</para>
</refsect1>
</refentry>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_submit_form_action</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>trigger</parameter></methodparam>
<methodparam><type>string</type><parameter>script</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_submit_form_action</function> sets a submit form
action for the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_javascript_action</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-set-target-frame">
<refnamediv>
<refname>fdf_set_target_frame</refname>
<refpurpose>Set target frame for form display</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_target_frame</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>frame_name</parameter></methodparam>
</methodsynopsis>
<para>
Sets the target frame to display a result PDF defined with <function>fdf_save_file</function> in.
</para>
<para>
See also <function>fdf_save_file</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,31 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-value">
<refnamediv>
<refname>fdf_set_value</refname>
<refpurpose>Set the value of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_value</methodname>
<methodparam><type>int</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
<methodparam><type>int</type><parameter>isName</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_value</function> function sets the
value of a field. The last parameter determines if the field value
is to be converted to a PDF Name (<parameter>isName</parameter> = 1)
or set to a PDF String (<parameter>isName</parameter> = 0).</para>
<para>
See also <function>fdf_get_value</function>.</para>
</refsect1>
</refentry>
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-set-value">
<refnamediv>
<refname>fdf_set_value</refname>
<refpurpose>Set the value of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_value</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>isName</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_value</function> function sets the
<parameter>value</parameter> for a field named <parameter>fieldname</parameter>.
The <parameter>value</parameter> will be stored as a string unless it is an array.
In this case all array elements will be stored as a value array.
</para>
<note>
<para>
In older versions of the fdf toolkit last parameter determined if the field value
was to be converted to a PDF Name (<parameter>isName</parameter> = 1)
or set to a PDF String (<parameter>isName</parameter> = 0). The value is no
longer used in the current toolkit version 5.0. For compatibility reasons it is
still supported as an optional parameter beginning with PHP 4.3, but ignored internaly.
</para>
<para>
Support for <parameter>value</parameter> arrays was added in PHP 4.3.
</para>
</note>
<para>
See also <function>fdf_get_value</function> and
<function>fdf_remove_item</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-set-version">
<refnamediv>
<refname>fdf_set_version</refname>
<refpurpose>Sets version number for a FDF file </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>fdf_set_version</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>version</parameter></methodparam>
</methodsynopsis>
<para>
This function will set the fdf <parameter>version</parameter>
for the given <parameter>fdf_document</parameter>. Some features
supported by this extension are only available in newer fdf versions.
For the current FDF toolkit 5.0 <parameter>version</parameter>
may be either '1.2', '1.3' or '1.4'.
</para>
<para>
See also <function>fdf_get_version</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-header">
<refnamediv>
<refname>fdf_header</refname>
<refpurpose>Sets FDF-specific output headers</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_header</methodname>
<void/>
</methodsynopsis>
<para>
This is a convenience function to set appropriate HTTP headers
for FDF output. It sets the <literal>Content-type:</literal>
to <literal>application/vnd.fdf</literal>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<reference id="ref.fdf">
<title>Forms Data Format functions</title>
<titleabbrev>FDF</titleabbrev>
@ -50,8 +50,11 @@
<section id="fdf.requirements">
&reftitle.required;
<para>
You must download the FDF toolkit from
You need the FDF toolkit SDK available from
<ulink url="&spec.pdf.fdf;">&spec.pdf.fdf;</ulink>.
As of PHP 4.3 you need at least SDK version 5.0.
The FDF toolkit library is available in binary form only,
platforms supported by Adobe are Win32, Linux, Solaris and AIX.
</para>
</section>
@ -64,10 +67,16 @@
<note>
<simpara>
If you run into problems configuring PHP with fdftk support, check
whether the header file FdfTk.h and the library libFdfTk.so are at
the right place. They should be in fdftk-dir/include and
fdftk-dir/lib. This will not be the case if you just unpack
the FdfTk distribution.
whether the header file <filename>fdftk.h</filename> and the library
<filename>libfdftk.so</filename> are at the right place.
The configure script supports both the directory structure of the
FDF SDK distribution and the usual <filename>DIR/include</filename> /
<filename>DIR/lib</filename> layout, so you can point it either
directly to the unpacked distribution directory or put the header
file and the appropriate library for your platform into e.g.
<filename>/usr/local/include</filename> and
<filename>/usr/local/lib</filename> and configure with
<literal>--with-fdftk=/usr/local</literal>.
</simpara>
</note>
</section>
@ -79,8 +88,16 @@
<section id="fdf.resources">
&reftitle.resources;
<para>
</para>
<section id="fdf.resources.fdf">
<title>fdf</title>
<para>
Most fdf functions require a <parameter>fdf</parameter> resource
as their first parameter. A <parameter>fdf</parameter> resource
is a handle to an opened fdf file. <parameter>fdf</parameter>
resources may be obtained using <function>fdf_create</function>,
<function>fdf_open</function> and <function>fdf_open_string</function>.
</para>
</section>
</section>
&reference.fdf.constants;
@ -94,16 +111,11 @@
<programlisting role="php">
<![CDATA[
<?php
// Save the FDF data into a temp file
$fdffp = fopen("test.fdf", "w");
fwrite($fdffp, $HTTP_FDF_DATA, strlen($HTTP_FDF_DATA));
fclose($fdffp);
// Open temp file and evaluate data
// Open fdf from input string provided by the extension
// The pdf form contained several input text fields with the names
// volume, date, comment, publisher, preparer, and two checkboxes
// show_publisher and show_preparer.
$fdf = fdf_open("test.fdf");
$fdf = fdf_open_string($HTTP_FDF_DATA);
$volume = fdf_get_value($fdf, "volume");
echo "The volume field has the value '<B>$volume</B>'<BR>";