openlayer Wrapper - Export map as PNG

I’m looking for a way to export part of a map as PNG/JPG. It seems to be doable with pure Javascript and Openlayer (https://openlayers.org/en/latest/examples/export-map.html), but I was wondering if the openlayer adds-on wrapps a similar functionality as well?

Similar functionality can be accomplished with Vaadin of course. You can either write a Java API for it to the add-on or do some JS hack to register similar listener. But if you want to get the bitmap to the server side code for further processing, we’d need to figure out how to transfer the raster data generated from the canvas element to the server.

cheers,
matti