Either way what you are trying can not be achieved from portlets.
Youa re trying to open a binary dowloadable file through portlet.
Portlets do not recognize any MIME type except text/html.
So also the httpservletresponse needs to be casted to a websphere specfic
servlet response .
Anyway the correct way of handling such calls and I need to send a PDf output is that you invoke a link from your portlet page which in turn invokes a servlet in your web app and do the necessary content header setting in the servlet and write directly the stream output form servlet without going to the portlet.
HTH
Dhiren