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
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheetcontrol-api-e4655
using (FileStream pdfFileStream = new FileStream("Documents\\Document_PDF.pdf", FileMode.Create)) {
workbook.ExportToPdf(pdfFileStream);
}
See Also