Now, I want to store/save these charts as tempfile in the work folder to access for the next action that is PDF generator. So, I want to add these charts as Images inside HTML image-holders to create PDF report.
The shared thread is about downloading the plotly chart by user. Where in my case, I want to automate the process of saving the plotly chart as .png in the same folder temporarily for next step use.
I will also look into the shared tread if anything can be tweaked for automation.
Could you share the snippet for using pdfkit to produce an html that reads images from a folder you’re trying to use? There might be 2 things to worry about:
For static image export of plotly I usually go with Kaleido to write in tempfile locally so hopefully that should work for you too
Depending on your code, the way you link to an image in your html template before reading with pdfkit could not work because the work folder is not accessible by the HTML file. This may be a thing to solve by for example saving the temp image in the Streamlit static folder (not sure we need to go as far as this, should depend on your code )