Open GoogleCodeExporter opened 8 years ago
The issue has been solved. The problem was not with AlivePDF. It was java
servlet
part causing problem. After changing it to,
int i = 0;
int k = 0;
int maxLength = request.getContentLength();
byte[] bytes = new byte[maxLength];
String method = request.getParameter("method");
String name = request.getParameter("name");
ServletInputStream si = request.getInputStream();
while (true)
{
k = si.read(bytes,i,maxLength);
i += k;
if (k <= 0)
break;
}
if (bytes != null)
{
ServletOutputStream stream = response.getOutputStream();
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
response.setHeader("Content-Disposition",method + ";filename=" + name);
stream.write(bytes);
stream.flush();
stream.close();
it solved the problem.
Original comment by kumarpra...@gmail.com
on 5 Jun 2010 at 6:05
Original issue reported on code.google.com by
kumarpra...@gmail.com
on 5 Jun 2010 at 3:13