don't know if it might help ...

attachment is used to open the pdf in the viewer, not in the browser window
inline is used to see it in the browser window. But I noticed it doesn't work on all plateforms.

for attachment, I use the folowing code :

// To enable IE Cache
response.setHeader("Pragma", ""); // in case it wat defined elsewhere
response.setHeader("Cache-Control", ""); // in case it was defined elsewhere
Calendar c = Calendar.getInstance();
c.add(Calendar.SECOND, 15);
response.setHeader("Expires", c.getTime().toString());

response.setContentLength(bytes.length);
response.setHeader("Content-Disposition", "attachment; filename=\"myname.pdf\"");


Mike

Zmitko, Jan a écrit :
Hi,

I try do suggest a filename to the generated pdf´s. However the PDF should be display automaticly this meand without some further action of the user.
This HTTP Header Information works

response.setHeader("Content-Disposition", "attachment; filename=" + fileName);

and this does not works

response.setHeader("Content-Disposition", "inline; filename=" + fileName);

Is the comibination of the values inline and filename not possible?

Thanks for any Ideas,

Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to