<?
// FDF HEADER FILE
$fdfdata = "%FDF-1.2\n%âãÏÓ\n1 0 obj << /FDF << /Fields [";
// Each of the following is a field in a form in the PDF (field 'Name' gets data 'Ugly Smurfs')
// Simply repeat for each field. Remember capitalisation counts
$fdfdata .= "<< /V (Ugly Smurfs) /T (Name) >> ";
$fdfdata .= "<< /V (Eat salt licks) /T (WHATEVER) >> ";
$fdfdata .= "<< /V (my name is) /T (Bubba) >> ";
$fdfdata .= "]\n";
// This is the URL of the PDF we want to populate
$fdfdata .= "/F (http://192.168.0.12/Doc1.pdf) >>";
// Closing the FDF
$fdfdata .= ">>\nendobj\ntrailer\n<<\n/Root 1 0 R\n>>\n";
$fdfdata .= "%%EOF";
/ Now we send the FDF data which causes Acrobat to start /
// Note: we send a header which tells IE etc how to handle it. Be sure the mime type application/vnd.fdf
// is associated with Acrobat.exe (windows explorer for IE or Preferences in Netscape)
header ("Content-Type: application/vnd.fdf");
print($fdfdata);
?>
Note: IE has a very BIG flaw. The PDF when it loads will overload the page in the parent window. This is even true
if you try to get it to load in a javascript pop-up or in a frame. The pop up will close and all frames will go away.
This means if you use transparent sessions instead of cookies you loose your session. Otherwise its not
a problem. Netscape does not have this problem