Button to take a screen shot / screen shot?

Hello,

I am trying to create a button to take a screen capture. I found another thread (How to create a button to make a screen capture (then have it emailed to someone) > focused on taking it on a phone) that linked to this nifty resource: https://html2canvas.hertzen.com/

But I can't quite get it to work. I've created a function and popped the js in it, then created a rectangle and popped the HTML code in the code section (the part that pops up when you select the pencil). but no cigar. Have also tried running the function on screen load and placing the HTML in a button. I'm a bit stuck and not sure what else to try. Can anyone point me in the right direction?

Hi Sarah,

here is a working example using html2canvas.
Feel free to use it as a base in your development.
screengrab.hype.zip (164.1 KB)

Olof

2 Likes

Thank you so much - that really helped!

I am having a problem where the content of the screen grab doesn't look like the content on screen. (see attached) I assume it is because I have used the flexible layout settings of shrink to fit and zoom contents. Do you have any idea how to overcome this? Many thanks!


Not knowing your document ... i'd guess setting the Hype-Wrapper-Element-Size (window¿) to the hype-initial-layoutsize and then doing the html2canvas-command could result in a propper image.

A paid service like https://apiflash.com/ may give in better results regarding a scaling like 'shrink to fit' ...