Build XHR POST request for export with HTML content along with metadata (width/height of content area, export type, etc.)
Surface output to user (file download or error message)
renderToStaticHtml() does a few things:
Remove elements that are not related to user content (e.g. UI components)
Inline relevant style sheets
Pull-in and inline images as base64 data URLs
returns string with HTML content
Export service queues request. Target location for output is based on UUID.
User hits
Export
Poll target location (based on UUID) for a given period of time to see if we Export service is done. Fail is there's a timeout.
outerHTML of sheet is passed to
StaticHtmlGenerator.renderToStaticHtml()
Export service uses puppeteer to render HTML to export format (PNG image or PDF document), and writes output to target location.
Server parses request, generates a UUID for the export request, re-packages data along with request UUID and sends an HTTP request to Export service