IWorkbook.ExportToPdf(String, PdfExportOptions) Method
Exports the workbook to the specified file path in PDF format using the specified options.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v25.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
fileName | String | A String which specifies the file name (including the full path) for the created PDF file. |
options | PdfExportOptions | A PdfExportOptions object specifying export settings. |
Remarks
The following code snippet exports the spreadsheet document as a PDF file with the specified settings:
IWorkbook workbook = spreadsheetControl1.Document;
PdfExportOptions options = new PdfExportOptions();
options.DocumentOptions.Author = "John Doe";
options.DocumentOptions.Title = "Breakeven Analysis";
options.ImageQuality = PdfJpegImageQuality.Medium;
options.ExportBookmarks = false;
workbook.ExportToPdf("Documents\\Document_PDF.pdf", options);
See Also