webpage-screenshot

converting webpage into jpeg image using java

◇◆丶佛笑我妖孽 提交于 2019-12-10 14:19:00
问题 I am building a web application, in Java, where i want the whole screenshot of the webpage, if i give the URL of the webpage as input. The basic idea i have is to capture the display buffer of the rendering component..I have no idea of how to do it.. plz help.. 回答1: There's a little trick I used for this app: count down demo app http://img580.imageshack.us/img580/742/capturadepantalla201004wd.png Java application featuring blog.stackoverflow.com page ( click on image to see the demo video )

Taking Screenshot of Web Page (with Silverlight Controls) Programatically

♀尐吖头ヾ 提交于 2019-12-09 19:00:53
问题 I have a web page that displays some silver light controls. I need to take screenshot of this web page programmatically. Currently using the System.Windows.Forms.WebBrowser control for taking screenshot. Forms.WebBrowser works fine when I take screenshot for normal pages. However for the pages with Silverlight controls it does not work. My code for taking screenshot is as follows: Bitmap bitmap = null; using (WebBrowser webBrowser = new WebBrowser()) { webBrowser.ScrollBarsEnabled = false;

Correct syntax for taking screenshots with Selenium's WebDriverJs on Node

情到浓时终转凉″ 提交于 2019-12-08 15:05:36
问题 What is the correct way of taking a screenshot when running a webdriver test with Selenium's webdriverjs? I have the stand-alone selenium server started and I can see the command for taking screenshot is logged on the selenium-server, but the screenshot is not being saved. My code is the following: var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder().usingServer('http://localURL:4444/wd/hub').withCapabilities({'browserName': 'chrome'}).build(); driver.get([URL

Is there a way to run c# forms application without showing a gui window (like a console application)

£可爱£侵袭症+ 提交于 2019-12-08 05:00:51
问题 Is there a way to run c# forms application without showing a gui window (like a console application). I'm trying to take screen shorts of webpages loaded into a webkit.net control. Everything works fine and I can get screenshots but if there is a way to run the application without showing the window, it will be much cleaner to include it in scripts to automate webpage capture. I have tried: form.hide() method but some how it doesn't hide anything at all. 回答1: Inside your application, when you

html2canvas - no screenshot for iframe

喜欢而已 提交于 2019-12-07 03:42:00
问题 I have a task where i need to load a URL (e.g www.yahoo.com) , on my webpage, and take screenshot. I am using html2canvas for screenshot and appending it to the body of the page. The page specified by the URL is successfully loaded in an iframe inside a div element. But when i try to take screenshot of that, the iframe area comes blank. Below is the code for previewURL and screenshot . //to preview the URL content function previewUrl(url,target){ //use timeout coz mousehover fires several

html2canvas - no screenshot for iframe

馋奶兔 提交于 2019-12-05 07:30:27
I have a task where i need to load a URL (e.g www.yahoo.com) , on my webpage, and take screenshot. I am using html2canvas for screenshot and appending it to the body of the page. The page specified by the URL is successfully loaded in an iframe inside a div element. But when i try to take screenshot of that, the iframe area comes blank. Below is the code for previewURL and screenshot . //to preview the URL content function previewUrl(url,target){ //use timeout coz mousehover fires several times clearTimeout(window.ht); window.ht = setTimeout(function(){ var div = document.getElementById(target

Browser screenshot as bitmap in WP7

浪子不回头ぞ 提交于 2019-12-04 16:45:46
I'm trying to get the screenshot of a given URL as a bitmap image on the Windows Phone. The WebBrowser class does not seem to have the DrawToBitmap method. Any pointers on how to get this working? You can't take a screenshot of the WebBrowser Control as there seems to be a bug with the way it works with WriteableBitmaps. An alternative method could be to send the URL to a web service which takes a screenshot on the server and returns it back to your app. Use WriteableBitmap to render the WebBrowser control and its contents to a bitmap as described by Laurent's article Taking a screenshot from

Taking Screenshot of Web Page (with Silverlight Controls) Programatically

自闭症网瘾萝莉.ら 提交于 2019-12-04 13:51:51
I have a web page that displays some silver light controls. I need to take screenshot of this web page programmatically. Currently using the System.Windows.Forms.WebBrowser control for taking screenshot. Forms.WebBrowser works fine when I take screenshot for normal pages. However for the pages with Silverlight controls it does not work. My code for taking screenshot is as follows: Bitmap bitmap = null; using (WebBrowser webBrowser = new WebBrowser()) { webBrowser.ScrollBarsEnabled = false; webBrowser.ScriptErrorsSuppressed = true; // Set the size of the WebBrowser control webBrowser.Width =

How to take screenshot of a website with Rails 3.1? — without using a service

泪湿孤枕 提交于 2019-12-04 07:50:07
问题 Almost every answer I've found references using some existing service. Is there a way to do this using Rails 3.1 programmatically? This was dead easy to do with PHP (there are prebuilt libraries in PHP that do this). What I'm looking to do, given a URL, is: Take a screenshot of the website Crop it (only take the top left most 100x100 pixels PS. Here is my environment: Rails 3.1 , Ruby 1.9.2 Note: The solution would probably need to follow any redirections on the URL as well. Updates: I've

Phantomjs works but is very slow

て烟熏妆下的殇ゞ 提交于 2019-12-03 05:55:17
问题 I am trying to take a screenshot of a webpage with PhantomJS. Specifically, I am using the example of capturing espn.com from this example. My code looks like this: var page = new WebPage(); page.open('http://www.espn.com', function (status) { page.render('fb.png'); phantom.exit(); }); I then go to my PhantomJS directory with either my terminal or command prompt and run: phantomjs shotty.js Everything runs great, however it takes 6-8 seconds to complete the output image. Is that normal? Is