Oooh, and I forgot! In addition to all the other Microsuck non-compliance...
IE just plain doesn't like the IDEA of a dynamic PDF file. Thus, if you use the usual no-cache headers, it will puke on you. So what you have to do is embed a random part in your URL. Continuing with our example from yesterday, instead of: http://example.com/yourexistingscript/id/42/phony.pdf You need to have do something like this: http://example.com/yourexistingscript/id/42/iebroken756348329/phony.pdf Note that the digits following 'iebroken' need to be RANDOM. Here's the code I use to change the action of my "Submit" button in my most recent project: //strip off the name of the PDF: $self_last_slash = strrpos($self, '/'); $self_front = substr($self, 0, $self_last_slash - 1); $self_back = substr($self, $self_last_slash); //strip off the previous random insertion: $self_front_last_slash = strrpos($self_front, '/'); $self_front = substr($self, 0, $self_front_last_slash); mt_srand((double) microtime() * 1000000); $microsoft_sucks = mt_rand(1, mt_getrandmax()); $microsoft_sucks = "iebroken$microsoft_sucks"; $action = "http://$hostname$self_front/$microsoft_sucks$self_back"; error_log("Setting action to $action"); //You'll have to read the docs at http://fooassociates.com/phpfer/html/rn20re284.html to grok the bindec stuff. fdf_set_submit_form_action($outfdf, "Save", FDFUp, $action, bindec("00111")); And, finally, even though Micrsuck IE "ignores" the Content-type: in favor of the .pdf at the end (see previous post in this thread), you MUST use the Content-type: "vnd.fdf" in order to get the FDF to actually "work" through IE+Acrobat. I'm assuming IE+Reader also needs this, but haven't tested that just yet. So, to summarize: 1. You need the URL to END in .pdf, because IE sucks. 2. You can't have ?variable=value at the end of the URL, because IE sucks. 3. You can't use no-cache headers, because IE sucks. 4. While 1. might make you think the Content-type is irrelevant, it must be "application/vnd.fdf" because IE sucking doesn't convince Acrobat to do the right thing. 5. IE sucks. Thus, you have to rename your script without the .php and use .htaccess to force it to execute, you then have to tack on all your variable=value pairs in a "fake" path, as well as a random string, and finally the URL has to end in .pdf to make IE happy. You can't send the no-cache headers, and you must send the "application/vnd.dfd" content-type. Do all that, and IE actually works. Well, as much as IE can ever be said to work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php