dosubot[bot] commented on issue #37491:
URL: https://github.com/apache/superset/issues/37491#issuecomment-3805478744

   <!-- Answer -->
   Export to PDF fails for dashboards with deck.gl charts because the current 
export process uses dom-to-pdf and html2canvas, which do not support capturing 
WebGL content like deck.gl visualizations. This leads to 404 errors for 
resources such as "%23c" (URL-encoded SVG references) and failed image loads in 
the browser console. Downloading deck.gl charts as images works, but PDF export 
does not, due to these limitations 
[(details)](https://github.com/apache/superset/issues/31579).
   
   Superset has introduced a rasterized PDF export feature to help with this. 
To use it, set the feature flags ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS and 
ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT to True, and make sure Celery 
and cache are properly configured for screenshot generation. If you see a 404 
from the screenshot API, it usually means the screenshot is not cached 
yet—check your Celery worker and cache setup [(setup 
guide)](https://github.com/apache/superset/discussions/32149#discussioncomment-13115705).
   
   For advanced users, a frontend workaround is to replace dom-to-pdf with 
dom-to-image-more and jsPDF, which can better capture WebGL/deck.gl canvases 
client-side, but this requires code changes 
[(workaround)](https://github.com/apache/superset/issues/31579#issuecomment-2556553588).
   
   There is no out-of-the-box support for exporting deck.gl charts to PDF in 
Superset at this time.
   
   
   <!-- 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/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/db4b86ba-9276-4256-a2a3-ef32e97badba?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=Export%20to%20PDF%20fails%20for%20dashboards%20with%20deck.gl%20charts%20because%20the%20current%20export%20process%20uses%20dom-to-pdf%20and%20html2canvas%2C%20which%20do%20not%20support%20capturing%20WebGL%20content%20like%20deck.gl%20visualizations.%20This%20leads%20to%20404%20errors%20for%20resources%20such%20as%20%22%2523c%22%20%28URL-encoded%20SVG%20references%29%20and%20failed%20image%20loads%20in%20the%20browser%20console.%20Downloading%20deck.gl%20charts%20as%20images%20works%2C%20but%20PDF%20export%20does%20not%2C%20due%20to%20these%20limitations%20%5B%28details%29%5D%28https%3A//github.com/apache/superset/issues/31579%29.%0A%0ASuperset%20has%20introduced%20a%20rasterized%20PDF%20export%20feature%20to%20help%20with%20this.%20To%20use%20it
 
%2C%20set%20the%20feature%20flags%20ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS%20and%20ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT%20to%20True%2C%20and%20make%20sure%20Celery%20and%20cache%20are%20properly%20configured%20for%20screenshot%20generation.%20If%20you%20see%20a%20404%20from%20the%20screenshot%20API%2C%20it%20usually%20means%20the%20screenshot%20is%20not%20cached%20yet%E2%80%94check%20your%20Celery%20worker%20and%20cache%20setup%20%5B%28setup%20guide%29%5D%28https%3A//github.com/apache/superset/discussions/32149%23discussioncomment-13115705%29.%0A%0AFor%20advanced%20users%2C%20a%20frontend%20workaround%20is%20to%20replace%20dom-to-pdf%20with%20dom-to-image-more%20and%20jsPDF%2C%20which%20can%20better%20capture%20WebGL/deck.gl%20canvases%20client-side%2C%20but%20this%20requires%20code%20changes%20%5B%28workaround%29%5D%28https%3A//github.com/apache/superset/issues/31579%23issuecomment-2556553588%29.%0A%0AThere%20is%20no%20out-of-the-box%20support%20for%20exporting%20deck.gl%2
 0charts%20to%20PDF%20in%20Superset%20at%20this%20time.)&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/issues/37491)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to