Skip to main content
A newer version of this page is available. .

PdfStreamingExporter Class

Provides the functionality for exporting reports to PDF in streaming modes.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public class PdfStreamingExporter

Remarks

The PdfStreamingExporter class allows you to export reports to the PDF format in two export modes: streaming and multi-threaded streaming export.

Exporting large documents in each of these modes consumes much less memory in comparison with the in-memory mode (using the XtraReport.ExportToPdf methods). This helps you to overcome issues with an OutOfMemory exception and export reports of many thousands of pages.

The multi-threaded streaming export can create a PDF file in parallel with report document generation in different threads, due to which the export operation can be up to two times faster. When you encounter limitations on the number of threads (such as in a web application scenario), you can use single-thread streaming export.

Note

This class can be unsuitable in some rare cases, when your report contains specific customization with document bricks (for instance, in report scripts). In such cases, the in-memory approach should be applied.

To perform the export operation, create a new instance of the PdfStreamingExporter and call the PdfStreamingExporter.Export method. The class constructor accepts two arguments: the report you want to export and a value indicating whether to use multi-threaded or single-threaded streaming export.

using DevExpress.XtraReports.UI;

LargeReport report = new LargeReport();
new PdfStreamingExporter(report, true).Export("LargeReport.pdf");

Inheritance

Object
PdfStreamingExporter
See Also