GitHub user dosubot[bot] added a comment to the discussion: Export to pdf at 
dashboard level

<!-- Answer -->
This is a known issue in Superset when exporting dashboards with multiple or 
large tables—browser unresponsiveness often happens because the PDF export 
process is resource-intensive, especially with complex dashboards. The frontend 
export uses the dom-to-pdf library, which can consume a lot of memory, 
particularly if the dashboard has many rows or the html2canvas scale is set 
high (default is 2) 
[[source](https://github.com/apache/superset/blob/master/superset-frontend/src/utils/downloadAsPdf.ts)].

To improve your chances of a successful export:
- Limit the number of rows displayed in each table before exporting 
[[source](https://github.com/apache/superset/discussions/32918)].
- Try exporting a smaller or simpler dashboard to see if the issue persists.
- If you’re using Superset 5.0.0 or later, make sure all charts generate 
thumbnails, and consider setting `WEBDRIVER_TYPE` to `"chromium"` and reducing 
the `WEBDRIVER_WINDOW` size and `pixel_density` in your config for better 
performance [[source](https://github.com/apache/superset/discussions/34685)].
- If your dashboard includes images from external domains, check your Content 
Security Policy (CSP) settings—add those domains to the `connect-src` directive 
to avoid export failures 
[[source](https://github.com/apache/superset/issues/36268)].

Recent Superset versions have improved PDF export with multi-page support and 
full table data export, but if data-based generation fails, it falls back to 
screenshot-based export, which can still be heavy for the browser 
[[source](https://github.com/apache/superset/pull/35014)].

If you can share your Superset version and export method (built-in export vs. 
browser print), I can suggest more targeted steps.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/d9e48018-a731-461f-9e41-ecb00a5330b0?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20in%20Superset%20when%20exporting%20dashboards%20with%20multiple%20or%20large%20tables%E2%80%94browser%20unresponsiveness%20often%20happens%20because%20the%20PDF%20export%20process%20is%20resource-intensive%2C%20especially%20with%20complex%20dashboards.%20The%20frontend%20export%20uses%20the%20dom-to-pdf%20library%2C%20which%20can%20consume%20a%20lot%20of%20memory%2C%20particularly%20if%20the%20dashboard%20has%20many%20rows%20or%20the%20html2canvas%20scale%20is%20set%20high%20%28default%20is%202%29%20%5B%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/src/utils/downloadAsPdf.ts%29%5D.%0A%0ATo%20improve%20your%20chances%20of%20a%20successful%20export%3A%0A-%20Limit%20the%20number%20of%20ro
 
ws%20displayed%20in%20each%20table%20before%20exporting%20%5B%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/32918%29%5D.%0A-%20Try%20exporting%20a%20smaller%20or%20simpler%20dashboard%20to%20see%20if%20the%20issue%20persists.%0A-%20If%20you%E2%80%99re%20using%20Superset%205.0.0%20or%20later%2C%20make%20sure%20all%20charts%20generate%20thumbnails%2C%20and%20consider%20setting%20%60WEBDRIVER_TYPE%60%20to%20%60%22chromium%22%60%20and%20reducing%20the%20%60WEBDRIVER_WINDOW%60%20size%20and%20%60pixel_density%60%20in%20your%20config%20for%20better%20performance%20%5B%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/34685%29%5D.%0A-%20If%20your%20dashboard%20includes%20images%20from%20external%20domains%2C%20check%20your%20Content%20Security%20Policy%20%28CSP%29%20settings%E2%80%94add%20those%20domains%20to%20the%20%60connect-src%60%20directive%20to%20avoid%20export%20failures%20%5B%5Bsource%5D%28https%3A//github.com/apache/superset/issues/36268%29%5D.%0A%0AR
 
ecent%20Superset%20versions%20have%20improved%20PDF%20export%20with%20multi-page%20support%20and%20full%20table%20data%20export%2C%20but%20if%20data-based%20generation%20fails%2C%20it%20falls%20back%20to%20screenshot-based%20export%2C%20which%20can%20still%20be%20heavy%20for%20the%20browser%20%5B%5Bsource%5D%28https%3A//github.com/apache/superset/pull/35014%29%5D.%0A%0AIf%20you%20can%20share%20your%20Superset%20version%20and%20export%20method%20%28built-in%20export%20vs.%20browser%20print%29%2C%20I%20can%20suggest%20more%20targeted%20steps.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36735)

GitHub link: 
https://github.com/apache/superset/discussions/36735#discussioncomment-15288895

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to