views:

32

answers:

2

Using java is there open source code to open a website in internet explorer and capture a screenshot of the the whole length of the page including scrolling. Prefferably without seeing the browser appear on the screen. Need the image as a jpg or other image format, not as html

+1  A: 

You could do this using Selenium APIs via Java:

http://seleniumhq.org/docs/05_selenium_rc.html

Nissan Fan
Great this looks promising. What about pages with flash, will it capture that in a static form also ?
mrjohn
A: 

If you don't need the internet explorer to do this, you could use htmlunit to do the job:

HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc... just like you do in your "normal" browser.

With htmlunit you can't take a snapshot in form of a jpeg, bug you can access the html code of the page which you can use instead.

tangens
Sorry but I need the snapshot as an image jpg or other image format
mrjohn