Skip to main content
Row

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

void ExportToPdf(
    string fileName,
    PdfExportOptions options
)

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