• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AW: PDF IE & filedownload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: PDF IE & filedownload


  • Subject: AW: PDF IE & filedownload
  • From: Helge Staedtler <email@hidden>
  • Date: Fri, 02 Sep 2005 10:52:27 +0200

Title: AW: PDF IE & filedownload
from what i see at http://www.ietf.org/rfc/rfc2447.txt
you seem to have a typo in that. use the following:

   
        String contentDisposition = "inline;filename=\""+filenameForClient()+"\"";
            wr.setHeader( contentDisposition, "content-disposition" );

you should set two seperate header-entries.

regards,
helge


Am 02.09.2005 9:15 Uhr schrieb "Javier Solórzano" unter <email@hidden>:

I'm using the folowing Filedownloader.java component to display inline pdf of a frame. It runs great with Safari and Firefox (both PC & Mac) with Quicktime, Adobe Reader or the Shuberit plugin to display inline pdf but it displays garbage when I use IE and Adobe on a PC. I would swear it worked once (we seldom use IE, but clients insists on using it...) but now I only get garbage.

public class FileDownloader extends WOComponent {

    public FileDownloader(WOContext context) {
        super(context);
    }
    
    public void appendToResponse(WOResponse response, WOContext context) {
        if( session() != null) {
            if(((Session)session()).documentImage != null) {
                if(((Session)session()).documentImage.imageData() !=null && ((Session)session()).documentImage.mimeType() !=null) {
                    response.setContent(((Session)session()).documentImage.imageData());
                    response.setHeader(((Session)session()).documentImage.mimeType(), "content-type");
                    response.setHeader("inline","content-disposition"); 
                    response.setHeader("filename=","documentserver.pdf");
                    return;
                }
            }
        }
        super.appendToResponse(response,context);
    }

}

Any pointers would be appreciated, since I've been staying up late night the past few days with no joy. The easy answer would be f*** IE, but alas, I'm stuck with it...

Cheers,

JS


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AW: PDF IE & filedownload
      • From: Javier Solórzano <email@hidden>
References: 
 >PDF IE & filedownload (From: Javier Solórzano <email@hidden>)

  • Prev by Date: Re: Overriding component in a framework ???
  • Next by Date: Information regarding the WO5.3 Tools
  • Previous by thread: PDF IE & filedownload
  • Next by thread: Re: AW: PDF IE & filedownload
  • Index(es):
    • Date
    • Thread