Screenshot of Container

  
Hi There!

I need help on getting a screenshot of a container and i need to save it to a directory.

I've done the saving part. but the problem is i cannot capture the objects in the container.

I need something that have the same functions like this one.
http://html2canvas.hertzen.com/ , problem with this site is that it uses .php.

All i need now is get the screenshot of the container. and be able to save the screenshot.

Any suggestion would be greatly appreciated. Thanks in advance! have a good day!
Hi Lennard, 

From what I could read in the site you mention, "The whole screenshot is created with JavaScript", meaning, you can encaspulate the html2canvas,js they provide in the download area to an espace in outsystems and then use it in your app.

If you don't know how to do it, you can follow the How to integrate a Jquery Plugin in the OutSystems Platform community post.

Just curiosity, can you share the ultimate goal of that screenshot? 

Cheers, 
Ricardo
Hi Ricardo! thanks for your suggestion.

I need it for my project and they need to get a screenshot of a checklist and attach it to a record :D
Hi Lennard!

I found that script very useful and so I decided to play a bit around it... So I've created a component with it.

Check it out here: khtml2canvas!

Have fun, cheers!
Miguel
woah! that was what i've been looking for!:) thank you so much. I'm gonna try it out later! I've seen your sample and im gonna try it on my project. Thank you so much Miguel!:D
Miguel "Kelter" Antunes wrote:
Hi Lennard!

I found that script very useful and so I decided to play a bit around it... So I've created a component with it.

Check it out here: khtml2canvas!

Have fun, cheers!
Miguel
 Hi sir Miguel "Kelter" Antunes, im trying to check your work, i tried adding checkboxes. but it can't capture the textboxes?

 
Lennard Holgado wrote:
Miguel "Kelter" Antunes wrote:
Hi Lennard!

I found that script very useful and so I decided to play a bit around it... So I've created a component with it.

Check it out here: khtml2canvas!

Have fun, cheers!
Miguel
 Hi sir Miguel "Kelter" Antunes, im trying to check your work, i tried adding checkboxes. but it can't capture the textboxes?

 
 Hi sir Lennard! :)

I've added support for checks and radios, check the reply in the component discussion, and also the last component version (0.4.1r).

Cheers,
Miguel
 
Miguel "Kelter" Antunes wrote:
Lennard Holgado wrote:
Miguel "Kelter" Antunes wrote:
Hi Lennard!

I found that script very useful and so I decided to play a bit around it... So I've created a component with it.

Check it out here: khtml2canvas!

Have fun, cheers!
Miguel
 Hi sir Miguel "Kelter" Antunes, im trying to check your work, i tried adding checkboxes. but it can't capture the textboxes?

 
 Hi sir Lennard! :)

I've added support for checks and radios, check the reply in the component discussion, and also the last component version (0.4.1r).

Cheers,
Miguel
 
 
 Hmm, another question sir, how can i save the screenshot? is it possible to save the screenshot? Thank you so much sir miguel! you have been a great help to me! thank you
To save a canvas, check this out http://jsfiddle.net/VVN8X/1/
or this https://github.com/eligrey/FileSaver.js
Joop Stringer wrote:
To save a canvas, check this out http://jsfiddle.net/VVN8X/1/
or this https://github.com/eligrey/FileSaver.js
 Hi Sir Joop,

Thank you for your reply. I need something that i can save it using outsystems. maybe passing it through a url? so i can convert it to pdf then save it using File_Writebinary. Do you have any ideas? thank you again sir! have a nice day
 
Hi Lennard,

If you know how to add a piece of javascript (jQuery) to your page, than you are able to do it using outsystems...
I'll try to create a demo ...
And I'm pleased to be called Sir :-)
Hi guys,

I've already a working version of the khtml2canvas that saves to the disk an image of the canvas, I don't have time know for the last tests, but tomorrow morning will do it!

Cheers,
Miguel
Hehehe thanks sir joop! i can do add piece of javascript but i have a basic knowledge on using javascripts. not that great maybe 4 out of 10. so any advices are really a great help for me in order for me to learn new things. :)

Thanks sir Miguel! you have been a great help! You always have answers to my question. hehehe
Hi Lennard!

welcome to our community, here the help spirit is always present! :) As soon as I can, I'll be here to help you and all the other members.

I've uploaded a new version of khtml2canvas, it's now possible to save canvas into image. Take a look on the code, so you get used on how to do it!

You also pointed out that you want to export as pdf, don't forget to take a look on Html to PDF/Image Converter component!

Cheers!
Miguel
Hi Sir Miguel!

It is really very nice of you to help me on my project. i really appreciate i. I would be looking at your codes and i do hope I would be able to understand it. :)

Thank you so much and thank you to the Outsystems team for helping new users like me:)
Hi Sir Miguel,

Sorry if i've been asking question a lot, but i have a last question, in which part of the script would i able to specify the target directory?

Thank you sir