I know this problem well (I spend 3 full days trying to track it down). My guess is that you are using IE 5.5. The problem is with the browser not iText and not the version of windows. There is a problem with IE 5.5 (works fine in IE 5 and IE 6) that it tries to download pdf's into its local cache and load them from there. At least in tomcat 4 (I haven't tried other app servers), servlet content gets marked no-cache to keep proxy servers from caching it. So this no-cache header tells IE not to cache the file, but then IE 5.5 goes ahead and tries to load it from the cache anyway. The "File does not begin with %PDF" is true because what IE just loaded was a file that did not exist (it loads it as zero bytes) so clearly it doesn't start with anything.
The solution: upgrade IE 5.5 to the latest service pack or upgrade to IE 6. (or maybe try a different app server if you are using tomcat 4--the bug could be in the tomcat 4/ie 5.5 combination--though the fact that ms fixed this problem in a service pack points heavily to the problem being their's). --jim ----- Original Message ----- From: "Fred Boulos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 13, 2002 10:11 AM Subject: **SPAM** [iText-questions] File does not begin with %PDF > Hey, > has anyway encountered the specifics to the following error which happens with IE when streaming back a generated pdf file: File does not begin with %PDF. > > There is no problem with Netscape, Mozilla, or Opera, strictly IE on various versions of Windows. I am using iText to generate the PDF on the fly and stream it back over an SSL enabled connection. I have downloaded the file and verified that it is formatted correctly, and have also opened the same file directly in IE from my harddrive to ensure that IE does correctly recognize the file which it does. > > I have seen through several news groups that others have had the same problem, but no one has actually posted a workaround. I know that it is directly related to the web integration with Acrobat Reader, but disabling web integration is not an issue. > > Anyone encounter this? > > Thank you kindly, > Fred. > > > __________________________________________________________________ > Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ > > Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink > > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions