I thought the following might save someone a lot of time. The example fdf snippet above, namely:
$outfdf = fdf_create();
fdf_set_value($outfdf, "volume", $volume, 0);
$fp = fopen("outtest.fdf", "r");
will not work (or there's at least a big possibility it won't) in IE (version 6 sure and I suspect lower versions as well) if you have session.auto_start on. Apparently, setting a cookie before feeding the fdf to the browser somehow messes it up. It works fine in Netscape though. I spent days on Google before I found a post somewhere about someone else having the same problem.
The solution? Well, I created a separate directory in the web tree and turned session.auto_start off just for that directory like this:
php_admin_flag session.auto_start 0
Hope this was useful to somebody.