ID: 34811
Comment by: randyharden at utah dot gov
Reported By: kc at netspirit dot ch
Status: Assigned
Bug Type: FDF related
Operating System: Linux
PHP Version: 4.4.0
Assigned To: steinm
New Comment:

I have a pdf file with a text field (FooField) that can exceed 255
characters in length. I submit the form data using javascript
command:
this.submitForm ("http://urlname/Submit_Form.php");

In Submit_Form.php....

$fdf = fdf_open_string(file_get_contents("php://input"));
$str = fdf_save_string($fdf);
//(the echo $str shows that all of the text string is their even if the
string length exceeds 255 characters)
echo $str;

but... if I try to extract the value using:

$FooField=fdf_get_value($fdf, "FooField");

I get the correct results for strings up to 255 characters
but I get NULL as a result for strings > 255 chaaracters.


Previous Comments:
------------------------------------------------------------------------

[2005-10-11 14:09:29] [email]tony2001php.net[/email]

Assigned to the maintainer.

------------------------------------------------------------------------

[2005-10-10 15:55:30] kc at netspirit dot ch

code i used:

<?php
$pdformp = fopen("./test.dat", "w");
$fdf = fdf_open_string($HTTP_FDF_DATA);
while ($field = fdf_next_field_name($fdf, $field)) {
echo "$field is of type " . gettype ( fdf_get_value ( $fdf, $field ) )
.. " \"" . fdf_get_value ( $fdf, $field ) . "\" ";
fwrite($pdformp, "$field=" . fdf_get_value ( $fdf, $field ) . "\n");
}
fdf_close($fdf);
fclose($pdformp);
?>

------------------------------------------------------------------------

[2005-10-10 15:45:00] kc at netspirit dot ch

Description:
------------
Problem getting value of PDF-Multiline-Fields if the value is loger
than 256 chars.

found "ASInt32 nr, size = 256;" in "PHP_FUNCTION(fdf_get_value)" in
"ext/fdf/fdf.c"

Reproduce code:
---------------
Reprodiction:

- go to: [url]http://www.anyform.ch/test/132.pdf[/url]
- fill in the big field
- click on "Ausgabe-Optionen"

Expected result:
----------------
strText32 is of type string "hdsfj ....... sdfhjsd"



Actual result:
--------------
strText32 is of type boolean ""


------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=34811&edit=1[/url]