final OutputStream outputStream = contentItem.getOutputStream();
try
{
final PdfOutputProcessor outputProcessor = new PdfOutputProcessor(configuration, outputStream);
final PageableReportProcessor streamReportProcessor =
new PageableReportProcessor(masterReport, outputProcessor);
try
{
final ReportProgressListener[] progressListeners = getReportProgressListeners();
for (int i = 0; i < progressListeners.length; i++)
{
final ReportProgressListener listener = progressListeners[i];
streamReportProcessor.addReportProgressListener(listener);
}
streamReportProcessor.processReport();
}
finally
{
streamReportProcessor.close();
}
}
finally
{
outputStream.close();