TX Sheet Control

PdfExportOptions.dashboardWidth Property

Property

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

Package: @txtextcontrol/tx-sheet-control-server.

Syntax

dashboardWidth?: number;

Examples

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

import { writeFile } from 'node:fs/promises';
import { type ServerSheetControl, type Dashboard, StreamType } from '@txtextcontrol/tx-sheet-control-server';

async function exportDashboard(control: ServerSheetControl, dashboard: Dashboard) {
    dashboard.applyTheme('dark-1');
    const bytes = await control.save(StreamType.PDF, {
        pdf: { dashboardId: dashboard.id, dashboardWidth: 1440, dashboardPage: 'fit' }
    });
    await writeFile('performance.pdf', bytes);
}

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