Customize PDF Export Text for Printing Using a Dashboard Script [Linux]
Use this dashboard script to change selected text elements to black when exporting a dashboard to PDF.
This can improve readability when the dashboard uses a dark theme or light-colored text, particularly when the exported PDF is printed on a physical printer. The darker text provides better contrast and readability on printed pages, including black-and-white or grayscale prints.
The dashboard appearance remains unchanged for users when viewing the dashboard on a dashboard in UI.
1. Open the Dashboard Script
Open the required dashboard.
Switch to Edit mode.
Open the Dashboard Script editor.
Add the following JavaScript:
dashboard.on('refreshstart', setExportingStyles);
function setExportingStyles() {
$('.preview-header-container').css('color', 'black');
$('.K-P-O').css('color', 'black');
$('.K-O').css('color', 'black');
$('.R-S').css('color', 'black');
$('.preview-widget-header-holder').css('color', 'black');
$('.D-G-I').css('color', 'black');
$('.D-G-H').css('color', 'black');
$('.j-T').css('color', 'black');
$('.N-K').css('color', 'black');
}2. Save and refresh
Save the dashboard script and refresh the dashboard.
3. Export to PDF
Export the dashboard using the standard Export to PDF option.
The script changes the specified text elements to black during the export rendering process.
Expected Result
Selected text elements appear in black in the exported PDF.
The dashboard's normal appearance remains unchanged.
No separate dashboard is required.
This is useful for printed or grayscale reports.
Without a script:

WIth a script: 
Important Notes
This is a custom workaround and is not an out-of-the-box PDF color setting.
The script uses CSS selectors that may change between Sisense versions (current version tested on 2026.3.1-d)
Test the script after Sisense upgrades to ensure it continues to work as expected.
The solution may not affect every text element in the exported PDF.
Disclaimer
This is a custom workaround for a specific use case. It may not work in all Sisense versions or environments. Test the solution in your environment before deploying it to production.