TX Sheet Control

PdfOptions.DashboardWidth Property

Property
Namespace
TXTextControl.TXSheetControl.Server
Package
TXTextControl.TXSheetControl.Server as TXTextControl.TXSheetControl.Api.dll from the private NuGet feed or the supplied NuGet folder
Also in
TXTextControl.TXSheetControl.Blazor as TXTextControl.TXSheetControl.Api.dll

Sets the dashboard canvas width in CSS pixels, from 480 to 4096. The default width is 1440.

Syntax

public int? DashboardWidth { get; init; }

Examples

Pass an initialized control and an existing dashboard. Apply a coordinated theme and export the current reporting context as a PDF.

using TXTextControl.TXSheetControl.Server;

async Task ExportDashboard(ServerSheetControl control, Dashboard dashboard)
{
    await dashboard.ApplyThemeAsync("dark-1");
    await control.SaveAsync("performance.pdf", StreamType.PDF, new SaveOptions {
        Pdf = new PdfOptions {
            DashboardId = dashboard.Id,
            DashboardWidth = 1440,
            DashboardPage = "fit"
        }
    });
}

Remarks

PDF branding follows the configured license and whether the editor or server generates the file. Browser animations and editing controls are omitted. TXWB remains the editable dashboard format.

See Also