PHP Forms Data Format Functions

EditRocket provides the following information on Forms Data Format functions in the PHP source code builder.

bool fdf_add_doc_javascript ( resource $fdf_document , string $script_name , string $script_code ) - 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.

bool fdf_add_template ( resource $fdf_document , int $newpage , string $filename , string $template , int $rename ) -

void fdf_close ( resource $fdf_document ) - Closes the FDF document.

resource fdf_create ( void ) - Creates a new FDF document.

bool fdf_enum_values ( resource $fdf_document , callback $function [, mixed $userdata ] ) -

int fdf_errno ( void ) - Gets the error code set by the last FDF function call.

string fdf_error ([ int $error_code ] ) - Gets a textual description for the FDF error code given in error_code.

bool fdf_get_ap ( resource $fdf_document , string $field , int $face , string $filename ) - Gets the appearance of a field (i.e. the value of the /AP key) and stores it in a file.

array fdf_get_attachment ( resource $fdf_document , string $fieldname , string $savepath ) - Extracts a file uploaded by means of the file selection field fieldname and stores it under savepath.

string fdf_get_encoding ( resource $fdf_document ) - Gets the value of the /Encoding key.

string fdf_get_file ( resource $fdf_document ) - Gets the value of the /F key.

int fdf_get_flags ( resource $fdf_document , string $fieldname , int $whichflags ) -

mixed fdf_get_opt ( resource $fdf_document , string $fieldname [, int $element ] ) -

string fdf_get_status ( resource $fdf_document ) - Gets the value of the /STATUS key.

mixed fdf_get_value ( resource $fdf_document , string $fieldname [, int $which ] ) - Gets the value for the requested field.

string fdf_get_version ([ resource $fdf_document ] ) - Return the FDF version for the given document, or the toolkit API version number if no parameter is given.

void fdf_header ( void ) - This is a convenience function to set appropriate HTTP headers for FDF output. It sets the Content-type: to application/vnd.fdf.

string fdf_next_field_name ( resource $fdf_document [, string $fieldname ] ) - Gets the name of the field after the given field. This name can be used with several functions.

resource fdf_open ( string $filename ) - Opens a file with form data.

resource fdf_open_string ( string $fdf_data ) - Reads form data from a string.

bool fdf_remove_item ( resource $fdf_document , string $fieldname , int $item ) -

bool fdf_save ( resource $fdf_document [, string $filename ] ) - Saves a FDF document.

string fdf_save_string ( resource $fdf_document ) - Returns the FDF document as a string.

bool fdf_set_ap ( resource $fdf_document , string $field_name , int $face , string $filename , int $page_number ) - Sets the appearance of a field (i.e. the value of the /AP key).

bool fdf_set_encoding ( resource $fdf_document , string $encoding ) - Sets the character encoding for the FDF document.

bool fdf_set_file ( resource $fdf_document , string $url [, string $target_frame ] ) - Selects a different PDF document to display the form results in then the form it originated from.

bool fdf_set_flags ( resource $fdf_document , string $fieldname , int $whichFlags , int $newFlags ) - Sets certain flags of the given field.

bool fdf_set_javascript_action ( resource $fdf_document , string $fieldname , int $trigger , string $script ) - Sets a javascript action for the given field.

bool fdf_set_on_import_javascript ( resource $fdf_document , string $script , bool $before_data_import ) -

bool fdf_set_opt ( resource $fdf_document , string $fieldname , int $element , string $str1 , string $str2 ) - Sets options of the given field.

bool fdf_set_status ( resource $fdf_document , string $status ) - Sets the value of the /STATUS key. When a client receives a FDF with a status set it will present the value in an alert box.

bool fdf_set_submit_form_action ( resource $fdf_document , string $fieldname , int $trigger , string $script , int $flags ) - Sets a submit form action for the given field.

bool fdf_set_target_frame ( resource $fdf_document , string $frame_name ) - Sets the target frame to display a result PDF defined with fdf_save_file() in.

bool fdf_set_value ( resource $fdf_document , string $fieldname , mixed $value [, int $isName ] ) - Sets the value for the given field.

bool fdf_set_version ( resource $fdf_document , string $version ) - Sets the FDF version for the given document.