FDF_OPEN(3) 1 FDF_OPEN(3)fdf_open - Open a FDF documentSYNOPSIS
resource fdf_open (string $filename)
DESCRIPTION
Opens a file with form data.
You can also use fdf_open_string(3) to process the results of a PDF form POST request.
PARAMETERS
o $filename
- Path to the FDF file. This file must contain the data as returned from a PDF form or created using fdf_create(3) and
fdf_save(3).
RETURN VALUES
Returns a FDF document handle, or FALSE on error.
EXAMPLES
Example #1
Accessing the form data
<?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
$fdf = fdf_open("test.fdf");
/* ... */
fdf_close($fdf);
?>
SEE ALSO fdf_open_string(3), fdf_close(3), fdf_create(3), fdf_save(3).
PHP Documentation Group FDF_OPEN(3)
Check Out this Related Man Page
FDF_SAVE_STRING(3) 1 FDF_SAVE_STRING(3)fdf_save_string - Returns the FDF document as a stringSYNOPSIS
string fdf_save_string (resource $fdf_document)
DESCRIPTION
Returns the FDF document as a string.
PARAMETERS
o $fdf_document
- The FDF document handle, returned by fdf_create(3), fdf_open(3) or fdf_open_string(3).
RETURN VALUES
Returns the document as a string, or FALSE on error.
EXAMPLES
Example #1
Retrieving FDF as a string
<?php
$fdf = fdf_create();
fdf_set_value($fdf, "foo", "bar");
$str = fdf_save_string($fdf);
fdf_close($fdf);
echo $str;
?>
The above example will output:
%FDF-1.2
%aaIO
1 0 obj
<<
/FDF << /Fields 2 0 R >>
>>
endobj
2 0 obj
[
<< /T (foo)/V (bar)>>
]
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF
SEE ALSO fdf_open_string(3), fdf_close(3), fdf_create(3), fdf_save(3).
PHP Documentation Group FDF_SAVE_STRING(3)
I need to process a file in real time as it is being FTPed from a remote server. In my test environment, I wrote a process that would:
1) Open the file - fopen(filename, "r")
2) Go to the offset where I left off on the previous itteration (fseek)
3) Read 2K blocks and append each block to a... (1 Reply)
I have a file that is formatted in this way.
a1;b2;c33;d4;e5;e;f;f;f;s
d;ds;d;a;v;b;g;gr;r;rt;fdf
s1;s2;s2;s3;s4;
b1;f2;g3;h4;a3c4e;xcsd;fds;
sd2;fs4;fs2;sdf3;
I want to replace the value just before the 4th semicolon to empty string, regardless the value, such that it looks... (3 Replies)