Back to Devexpress

DiagramControl.ExportToPdf(String, Nullable<Rect>, PdfExportOptions) Method

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramcontrol-dot-exporttopdf-x28-system-dot-string-system-dot-nullable-system-dot-windows-dot-rect-devexpress-dot-xtraprinting-dot-pdfexportoptions-x29.md

latest2.4 KB
Original Source

DiagramControl.ExportToPdf(String, Nullable<Rect>, PdfExportOptions) 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 diagram to a single-page PDF file.

Namespace : DevExpress.Xpf.Diagram

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

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
public void ExportToPdf(
    string path,
    Rect? exportBounds = null,
    PdfExportOptions options = null
)
vb
Public Sub ExportToPdf(
    path As String,
    exportBounds As Rect? = Nothing,
    options As PdfExportOptions = Nothing
)

Parameters

NameTypeDescription
pathString

A string value that is the path to the file to which to save the diagram.

|

Optional Parameters

NameTypeDefaultDescription
exportBoundsNullable<Rect>null

A System.Windows.Rect object specifying the rectangle which encompasses the total background area when exporting the diagram.

| | options | PdfExportOptions | null |

The options that define how a document is exported.

|

Remarks

If the exportBounds parameter is not specified, the PrintExportMode and ExportMargin property values are used.

See Also

DiagramControl Class

DiagramControl Members

DevExpress.Xpf.Diagram Namespace