SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict ArunB's Avatar
    Join Date
    Jun 2008
    Location
    Hyderabad
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Generated PDF problem in IE

    I am generating a PDF dynamically using some PDF generation tool. In Firefox, I am able to see the PDF file and in Internet Explorer, I am getting the error "Internet Explorer cannot display the web page".

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I seem to remember that IE use the extention in the url to guess the content.
    At least, I remember I had this problem when streaming mp3 and displaying excel results from php.

    I had to put a mod_rewrite rule to force IE consider the content to be of a given type, even with the correct content-type header being sent.
    http://www.webmaster-talk.com/php-fo...tml#post839256
    Literally, with a mp3 streaming proxy which url was http://myserver.com/proxy.php, it played ok in anything, except windows media player or ie.
    placing a rewrite rule
    Code:
    ^proxy.mp3$  /proxy.php [NC,L]
    corrected the problem.

    the same goes for a generated excel file.
    I had to write a rule to use a url ending in .xls to have IE displaying it correctly.

  3. #3
    SitePoint Addict ArunB's Avatar
    Join Date
    Jun 2008
    Location
    Hyderabad
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    I got solution for this long time back and posting the solution here so that it would be helpful for others.

    The problem is with the whitespace at the beginning of the response. I have created a custom ob handler, which will trim the reponse.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •