<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.utilspec.nontext.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.fdf.php',
    1 => 'FDF',
    2 => 'Forms Data Format',
  ),
  'up' => 
  array (
    0 => 'refs.utilspec.nontext.php',
    1 => 'Non-Text MIME Output',
  ),
  'prev' => 
  array (
    0 => 'refs.utilspec.nontext.php',
    1 => 'Non-Text MIME Output',
  ),
  'next' => 
  array (
    0 => 'fdf.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/fdf/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.fdf.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.fdf" class="book">
 
 <h1 class="title">Forms Data Format</h1>
 
 
 
 <div id="intro.fdf" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="simpara">
   Forms Data Format (FDF) is a format for handling
   forms within PDF documents. You should read the documentation at 
   <a href="http://www.adobe.com/devnet/acrobat/fdftoolkit.html" class="link external">&raquo;&nbsp;http://www.adobe.com/devnet/acrobat/fdftoolkit.html</a>
   for more information on what FDF is and how it is used in general.
  </p>
  <p class="simpara">
   The general idea of FDF is similar to HTML forms. The difference is
   basically the format how data is transmitted to the server when the submit
   button is pressed (this is actually the Form Data Format) and the format
   of the form itself (which is the Portable Document Format, PDF).
   Processing the FDF data is one of the features provided by the fdf
   functions. But there is more.  One may as well take an existing PDF form
   and populated the input fields with data without modifying the form
   itself. In such a case one would create a FDF document
   (<span class="function"><a href="function.fdf-create.php" class="function">fdf_create()</a></span>) set the values of each input field
   (<span class="function"><a href="function.fdf-set-value.php" class="function">fdf_set_value()</a></span>) and associate it with a PDF form
   (<span class="function"><a href="function.fdf-set-file.php" class="function">fdf_set_file()</a></span>). Finally it has to be sent to the
   browser with MimeType <code class="literal">application/vnd.fdf</code>. The Acrobat
   reader plugin of your browser recognizes the MimeType,  reads the
   associated PDF form and fills in the data from the FDF document.
  </p>

  <p class="simpara">
   If you look at an FDF-document with a text editor you will find a
   catalogue object with the name <code class="literal">FDF</code>. Such an object may
   contain a number of entries like <code class="literal">Fields</code>,
   <code class="literal">F</code>, <code class="literal">Status</code> etc..
   The most commonly used entries are <code class="literal">Fields</code> which points
   to a list of input fields, and <code class="literal">F</code> which contains the
   filename of the PDF-document this data belongs to. Those entries are
   referred to in the FDF documentation as /F-Key or /Status-Key.
   Modifying this entries
   is done by functions like <span class="function"><a href="function.fdf-set-file.php" class="function">fdf_set_file()</a></span> and
   <span class="function"><a href="function.fdf-set-status.php" class="function">fdf_set_status()</a></span>. Fields are modified with
   <span class="function"><a href="function.fdf-set-value.php" class="function">fdf_set_value()</a></span>, <span class="function"><a href="function.fdf-set-opt.php" class="function">fdf_set_opt()</a></span> etc..
  </p>
 </div>
 
 
 




 





 







 







<ul class="chunklist chunklist_book"><li><a href="fdf.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="fdf.requirements.php">Requirements</a></li><li><a href="fdf.installation.php">Installation</a></li><li><a href="fdf.resources.php">Resource Types</a></li></ul></li><li><a href="fdf.constants.php">Predefined Constants</a></li><li><a href="fdf.examples.php">Examples</a></li><li><a href="ref.fdf.php">FDF Functions</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.fdf-add-doc-javascript.php">fdf_add_doc_javascript</a> — Adds javascript code to the FDF document</li><li><a href="function.fdf-add-template.php">fdf_add_template</a> — Adds a template into the FDF document</li><li><a href="function.fdf-close.php">fdf_close</a> — Close an FDF document</li><li><a href="function.fdf-create.php">fdf_create</a> — Create a new FDF document</li><li><a href="function.fdf-enum-values.php">fdf_enum_values</a> — Call a user defined function for each document value</li><li><a href="function.fdf-errno.php">fdf_errno</a> — Return error code for last fdf operation</li><li><a href="function.fdf-error.php">fdf_error</a> — Return error description for FDF error code</li><li><a href="function.fdf-get-ap.php">fdf_get_ap</a> — Get the appearance of a field</li><li><a href="function.fdf-get-attachment.php">fdf_get_attachment</a> — Extracts uploaded file embedded in the FDF</li><li><a href="function.fdf-get-encoding.php">fdf_get_encoding</a> — Get the value of the /Encoding key</li><li><a href="function.fdf-get-file.php">fdf_get_file</a> — Get the value of the /F key</li><li><a href="function.fdf-get-flags.php">fdf_get_flags</a> — Gets the flags of a field</li><li><a href="function.fdf-get-opt.php">fdf_get_opt</a> — Gets a value from the opt array of a field</li><li><a href="function.fdf-get-status.php">fdf_get_status</a> — Get the value of the /STATUS key</li><li><a href="function.fdf-get-value.php">fdf_get_value</a> — Get the value of a field</li><li><a href="function.fdf-get-version.php">fdf_get_version</a> — Gets version number for FDF API or file</li><li><a href="function.fdf-header.php">fdf_header</a> — Sets FDF-specific output headers</li><li><a href="function.fdf-next-field-name.php">fdf_next_field_name</a> — Get the next field name</li><li><a href="function.fdf-open.php">fdf_open</a> — Open a FDF document</li><li><a href="function.fdf-open-string.php">fdf_open_string</a> — Read a FDF document from a string</li><li><a href="function.fdf-remove-item.php">fdf_remove_item</a> — Sets target frame for form</li><li><a href="function.fdf-save.php">fdf_save</a> — Save a FDF document</li><li><a href="function.fdf-save-string.php">fdf_save_string</a> — Returns the FDF document as a string</li><li><a href="function.fdf-set-ap.php">fdf_set_ap</a> — Set the appearance of a field</li><li><a href="function.fdf-set-encoding.php">fdf_set_encoding</a> — Sets FDF character encoding</li><li><a href="function.fdf-set-file.php">fdf_set_file</a> — Set PDF document to display FDF data in</li><li><a href="function.fdf-set-flags.php">fdf_set_flags</a> — Sets a flag of a field</li><li><a href="function.fdf-set-javascript-action.php">fdf_set_javascript_action</a> — Sets an javascript action of a field</li><li><a href="function.fdf-set-on-import-javascript.php">fdf_set_on_import_javascript</a> — Adds javascript code to be executed when Acrobat opens the FDF</li><li><a href="function.fdf-set-opt.php">fdf_set_opt</a> — Sets an option of a field</li><li><a href="function.fdf-set-status.php">fdf_set_status</a> — Set the value of the /STATUS key</li><li><a href="function.fdf-set-submit-form-action.php">fdf_set_submit_form_action</a> — Sets a submit form action of a field</li><li><a href="function.fdf-set-target-frame.php">fdf_set_target_frame</a> — Set target frame for form display</li><li><a href="function.fdf-set-value.php">fdf_set_value</a> — Set the value of a field</li><li><a href="function.fdf-set-version.php">fdf_set_version</a> — Sets version number for a FDF file</li></ul></li></ul></div><?php manual_footer($setup); ?>