We are doing it this way using T5's StreamResponse:
return new StreamResponse() {
public String getContentType() {
return pdf.getContentType();
}
public InputStream getStream() {
return pdf.getPdfStream();
}
public void prepareResponse(Response response) {
response.setHeader("Content-Disposition", "attachment;
filename=fpca.pdf");
}
};
The "pdf" variable is of our own class, but the only missing thing is
the content type, which we set as "application/pdf".
mrg
On Fri, Mar 26, 2010 at 10:24 AM, Everton Agner
<[email protected]> wrote:
> Hi,
>
> I need to return a PDF file as response of a ActionLink request... How can I
> do that? Can I return a Resource or a File in the "onActionFromXXXX()" method
> and T5 takes care of the Response header configuration?
>
> Thanks!
>
>
>
>
> ____________________________________________________________________________________
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]