# Surface 3D Chart Export to PNG programatically

**URL:** <https://community.plotly.com/t/surface-3d-chart-export-to-png-programatically/18128>\
**Category:** plotly.js\
**Created:** [January 15, 2019, 12:54pm UTC](https://community.plotly.com/t/surface-3d-chart-export-to-png-programatically/18128 "2019-01-15T12:54:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dante](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Dante](https://community.plotly.com/u/Dante)\
**Post date:** [January 15, 2019, 12:54pm UTC](https://community.plotly.com/t/surface-3d-chart-export-to-png-programatically/18128/1 "2019-01-15T12:54:41Z")

</div>

Hi. Is it possible to export a 3D surface chart programmatically through a javascript function ?  
Or simulate the click of the download button?

Thanks!

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [January 15, 2019, 3:55pm UTC](https://community.plotly.com/t/surface-3d-chart-export-to-png-programatically/18128/2 "2019-01-15T15:55:12Z")

</div>

Try `Plotly.downloadImage`

> **[Plotly.js Function Reference](https://plot.ly/javascript/plotlyjs-function-reference/#plotlydownloadimage)**
>
> Plotly.js function reference. How to create, update, and modify graphs drawn with Plotly's Javascript Graphing Library.

---

<div class="post-metadata">

**Author:** ![Dante](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Dante](https://community.plotly.com/u/Dante)\
**Post date:** [January 15, 2019, 4:11pm UTC](https://community.plotly.com/t/surface-3d-chart-export-to-png-programatically/18128/3 "2019-01-15T16:11:56Z")

</div>

Ok. It works.  
Thanks!
