Back to Devexpress

HierarchicalChartControlBase.ExportToPdf(String, PdfExportOptions) Method

windowsforms-devexpress-dot-xtratreemap-dot-hierarchicalchartcontrolbase-dot-exporttopdf-x28-system-dot-string-devexpress-dot-xtraprinting-dot-pdfexportoptions-x29.md

latest4.3 KB
Original Source

HierarchicalChartControlBase.ExportToPdf(String, 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 a treemap or sunburst to the specified file in the PDF format using the specified export options.

Namespace : DevExpress.XtraTreeMap

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

NuGet Package : DevExpress.Win.TreeMap

Declaration

csharp
public void ExportToPdf(
    string filePath,
    PdfExportOptions options = null
)
vb
Public Sub ExportToPdf(
    filePath As String,
    options As PdfExportOptions = Nothing
)

Parameters

NameTypeDescription
filePathString

The full path (including the file name and extension) where the PDF file will be created.

|

Optional Parameters

NameTypeDefaultDescription
optionsPdfExportOptionsnull

The object that stores options for export to the PDF format.

|

Remarks

To print the document immediately using the default printer without invoking any dialogs, use the HierarchicalChartControlBase.Print method.

To show the standard Print dialog, use the HierarchicalChartControlBase.ShowPrintDialog 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.

MethodDescription
HierarchicalChartControlBase.ShowPrintPreviewCreates the print document and displays the Print Preview of the document.
HierarchicalChartControlBase.ShowRibbonPrintPreviewCreates the print document and displays the Print Preview with the Ribbon toolbar of the document.

To export the treemap or sunburst, use the appropriate ExportTo method (e.g., HierarchicalChartControlBase.ExportToPdf, HierarchicalChartControlBase.ExportToImage, HierarchicalChartControlBase.ExportToXls, HierarchicalChartControlBase.ExportToXlsx, HierarchicalChartControlBase.ExportToRtf, HierarchicalChartControlBase.ExportToMht.)

Important

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

See Also

HierarchicalChartControlBase Class

HierarchicalChartControlBase Members

DevExpress.XtraTreeMap Namespace