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 |