html-to-image icon indicating copy to clipboard operation
html-to-image copied to clipboard

Canvas element doesnt appear in the image

Open jasjamjos opened this issue 3 years ago • 2 comments

When capturing a page using react/next js canvas elements doesn't appear.

jasjamjos avatar Jul 26 '22 16:07 jasjamjos

👋 @jasjamjos

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

biiibooo[bot] avatar Jul 26 '22 16:07 biiibooo[bot]

@jasjamjos Same problem. I solved this by adding preserveDrawingBuffer: true to my canvas element

ValentineKhvalko avatar Aug 09 '22 07:08 ValentineKhvalko

@jasjamjos Same problem. I solved this by adding preserveDrawingBuffer: true to my canvas element

Thank you for the answer, adding preserveDrawingBuffer:true as an option to canvas.getContext did the trick for me.

samcodes-io avatar Dec 12 '22 13:12 samcodes-io