XXXI. Forms Data Format functions

Installation

הערה : 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 .

Runtime Configuration

This extension does not define any configuration directives .

Predefined Constants

These constants are defined by this extension , and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime .

FDFValue ( integer )
FDFStatus ( integer )
FDFFile ( integer )
FDFID ( integer )
FDFFf ( integer )
FDFSetFf ( integer )
FDFClearFf ( integer )
FDFFlags ( integer )
FDFSetF ( integer )
FDFClrF ( integer )
FDFAP ( integer )
FDFAS ( integer )
FDFAction ( integer )
FDFAA ( integer )
FDFAPRef ( integer )
FDFIF ( integer )
FDFEnter ( integer )
FDFExit ( integer )
FDFDown ( integer )
FDFUp ( integer )
FDFFormat ( integer )
FDFValidate ( integer )
FDFKeystroke ( integer )
FDFCalculate ( integer )

Examples

דוגמה 1 .

 
?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

 
/

 
/

 
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")

 
;

 
$volume

 
=

 
fdf_get_value($fdf

 
,

 
"volume")

 
;

 
echo

 
"The

 
volume

 
field

 
has

 
the

 
value

 
'

 
B

 
$volume

 
/

 
B

 
'

 
BR

 
"

 
;

 
$date

 
=

 
fdf_get_value($fdf

 
,

 
"date")

 
;

 
echo

 
"The

 
date

 
field

 
has

 
the

 
value

 
'

 
B

 
$date

 
/

 
B

 
'

 
BR

 
"

 
;

 
$comment

 
=

 
fdf_get_value($fdf

 
,

 
"comment")

 
;

 
echo

 
"The

 
comment

 
field

 
has

 
the

 
value

 
'

 
B

 
$comment

 
/

 
B

 
'

 
BR

 
"

 
;

 
if(fdf_get_value($fdf

 
,

 
"show_publisher"

 
)

 
==

 
"On"

 
)

 
{

 
$publisher

 
=

 
fdf_get_value($fdf

 
,

 
"publisher")

 
;

 
echo

 
"The

 
publisher

 
field

 
has

 
the

 
value

 
'

 
B

 
$publisher

 
/

 
B

 
'

 
BR

 
"

 
;

 
}

 
else

 
echo

 
"Publisher

 
shall

 
not

 
be

 
shown

 
.













תוכן העניינים:
fdf_add_template -- Adds a template into the FDF document
fdf_close -- Close an FDF document
fdf_create -- Create a new FDF document
fdf_get_file -- Get the value of the /F key
fdf_get_status -- Get the value of the /STATUS key
fdf_get_value -- Get the value of a field
fdf_next_field_name -- Get the next field name
fdf_open -- Open a FDF document
fdf_save -- Save a FDF document
fdf_set_ap -- Set the appearance of a field
fdf_set_encoding -- Sets FDF character encoding
fdf_set_file -- Set the value of the /F key
fdf_set_flags -- Sets a flag of a field
fdf_set_javascript_action -- Sets an javascript action of a field
fdf_set_opt -- Sets an option of a field
fdf_set_status -- Set the value of the /STATUS key
fdf_set_submit_form_action -- Sets a submit form action of a field
fdf_set_value -- Set the value of a field