Back to Devexpress

DashboardExportOptionBuilder.PdfExportOptions(Action<DashboardPdfExportOptions>) Method

dashboard-devexpress-dot-dashboardaspnetcore-dot-dashboardexportoptionbuilder-dot-pdfexportoptions-x28-system-dot-action-devexpress-dot-dashboardcommon-dot-dashboardpdfexportoptions-x29.md

latest2.6 KB
Original Source

DashboardExportOptionBuilder.PdfExportOptions(Action<DashboardPdfExportOptions>) Method

Contains options which define how the dashboard item is exported to the PDF format.

Namespace : DevExpress.DashboardAspNetCore

Assembly : DevExpress.Dashboard.v25.2.AspNetCore.dll

NuGet Package : DevExpress.AspNetCore.Dashboard

Declaration

csharp
public DashboardExportOptionBuilder PdfExportOptions(
    Action<DashboardPdfExportOptions> config
)
vb
Public Function PdfExportOptions(
    config As Action(Of DashboardPdfExportOptions)
) As DashboardExportOptionBuilder

Parameters

NameTypeDescription
configAction<DashboardPdfExportOptions>

A delegate used to customize the DashboardPdfExportOptions object.

|

Returns

TypeDescription
DashboardExportOptionBuilder

A reference to this instance after the operation has completed.

|

Remarks

The code sample below shows how to configure PDF export options:

cshtml
@(Html.DevExpress().Dashboard("dashboardControl1")
    .Width("100%")
    .Height("100%")
    .OnBeforeRender("onBeforeRender")
    .Extensions(ext => {
        ext.DashboardExport(options => {
            options.PdfExportOptions(pdf => {
                pdf.PageLayout = DevExpress.DashboardCommon.DashboardExportPageLayout.Portrait;
                pdf.FontInfo.UseCustomFontInfo = true;
                pdf.FontInfo.GdiCharSet = 1;
                pdf.FontInfo.Name = "Arial";
            });
        });
    })
)

See Also

DashboardExportOptionBuilder Class

DashboardExportOptionBuilder Members

DevExpress.DashboardAspNetCore Namespace