Skip to main content
All docs
V25.2
  • ChartControl.ExportToRtf(String, RtfExportOptions) 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 control to an RTF document with the given path.

    Namespace: DevExpress.XtraCharts

    Assembly: DevExpress.XtraCharts.v25.2.UI.dll

    NuGet Package: DevExpress.Win.Charts

    Declaration

    public void ExportToRtf(
        string filePath,
        RtfExportOptions options = null
    )

    Parameters

    Name Type Description
    filePath String

    A file path that includes the file name and extension, where the file should be created.

    Optional Parameters

    Name Type Default Description
    options RtfExportOptions null

    A RtfExportOptions object that contains the options for the resulting RTF file.

    Remarks

    To show the standard Print dialog, use the ChartControl.Print method. The dialog allows end-users to print the chart, select the printer (if required), specify the range of pages to print, the number of copies, etc.

    To display the DevExpress Print Preview use one of the following methods.

    Method Description
    ChartControl.ShowPrintPreview Creates the print document and displays the Print Preview of the document.
    ChartControl.ShowRibbonPrintPreview Creates the print document and displays the Print Preview with the Ribbon toolbar of the document.

    To export the chart, use the appropriate ExportTo~ method (e.g., ChartControl.ExportToHtml, ChartControl.ExportToPdf, etc.)

    Important

    Note that, exporting to raster and vector images is implemented by the Chart and does not require any library.

    The chart can be previewed, printed and exported to other formats only if the Printing library is available. Make sure you add a reference to the DevExpress.XtraPrinting.v25.2 assembly.

    Also note that chart export to PDF requires the DevExpress.Pdf.Core library to be available.

    See Also