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

SpreadsheetControl.ExportToPdf(Stream) Method

Exports the content of the SpreadsheetControl to the specified stream in PDF format.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v18.2.dll

Declaration

public void ExportToPdf(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A Stream object to which the created document is exported.

Remarks

Refer to the Export to PDF document to learn about PDF export features and limitations.

Example

This example demonstrates how to save a workbook in PDF format via the IWorkbook.ExportToPdf method.

using (FileStream pdfFileStream = new FileStream("Documents\\Document_PDF.pdf", FileMode.Create)) {
    workbook.ExportToPdf(pdfFileStream);
}
See Also