ByteArrayInputStream byteIS = (ByteArrayInputStream)rcd.getPrintOutputController().export(ReportExportFormat.PDF);
byte[] buf = new byte[2000 * 1024];
response.reset();
response.setHeader("content-disposition", "inline;filename=untitled.pdf");
response.setContentType("application/pdf");
int nRead = 0;
while ((nRead = byteIS.read(buf)) != -1)
{
response.getOutputStream().write(buf, 0, nRead);
}
response.getOutputStream().flush(); response.getOutputStream().close();
void ExportToPDF(ReportClientDocument rcd)
{
ByteArrayInputStream byteIS = (ByteArrayInputStream)rcd.getPrintOutputController().export(ReportExportFormat.PDF);
byte[] buf = new byte[2000 * 1024];
response.reset();
response.setHeader("content-disposition", "inline;filename=untitled.pdf");
response.setContentType("application/pdf");
int nRead = 0;
while ((nRead = byteIS.read(buf)) != -1)
{
response.getOutputStream().write(buf, 0, nRead);
}
response.getOutputStream().flush();
response.getOutputStream().close();
}
|
Business Objects, an SAP company http://www.businessobjects.com/ Support services http://www.businessobjects.com/services/support/ Product Documentation on the Web http://support.businessobjects.com/documentation/ |