Back to Devexpress

SpreadsheetControl.ExportToPdf(String) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-exporttopdf-x28-system-dot-string-x29.md

latest2.0 KB
Original Source

SpreadsheetControl.ExportToPdf(String) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

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

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public void ExportToPdf(
    string fileName
)
vb
Public Sub ExportToPdf(
    fileName As String
)

Parameters

NameTypeDescription
fileNameString

A String which specifies the name (including the full path) of the PDF file to which the data is exported.

|

Remarks

The following code snippet exports the spreadsheet’s document to the PDF file:

csharp
spreadsheetControl1.ExportToPdf("Exported_String_Options_Document.pdf");
vb
spreadsheetControl1.ExportToPdf("Exported_String_Options_Document.pdf")

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

See Also

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace