Thanks for the reply... I was able to render the pdf in browser with the
following piece of code:
ResourceStreamRequestTarget target = new ResourceStreamRequestTarget(null){
@Override
public void detach(RequestCycle requestCycle) {
// TODO Auto-generated method stub
}
@Override
public void respond(RequestCycle requestCycle) {
try{
OutputStream out =
requestCycle.getResponse().getOutputStream();
out.write(stream.toByteArray());
out.flush();
stream.close();
}
catch(Exception e){
e.printStackTrace();
}
}
};
getRequestCycle().setRequestTarget(target.setFileName("eFile.pdf"));
But now the problem is that the file name I set in the last line doesnot
work. It renders as
<ClassName>.pdf
Any suggestions??? Thanks
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-show-pdf-ByteArrayResouce-in-browser-tp3320759p3321003.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]