Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
engg_babita
Posts: 3
Registered: ‎08-06-2010
My Device: Not Specified

Screenshot of scrollable web page

 

I am developing an application in which I want to take a screenshot of web page using inbuilt browser  by adding a menu item in the menu. I am able to take screenshot of the web page on clicking the menuitem.

But , if the size of the web page is more than the screen (i.e. if it is scrollable), then how can I take the screenshot of whole page . because it's showing only half of the screen in the screenshot.

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Screenshot of scrollable web page

I believe the screen shot API only will take a screen shot of the visible painted content on the screen.  I would imagine you could obtain the entire screen by doing something like the following pseudo code

 

 

var fullScreenCanvas = getCurrentScreenShot();

while (bottom of screen not showing) {
  fullScreenCanvas.appendBitmap(getCurrentScreenShot());
  scrollByHeightOfScreen()
}

return fullScreenCanvas;

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
engg_babita
Posts: 3
Registered: ‎08-06-2010
My Device: Not Specified

Re: Screenshot of scrollable web page

Sorry, I am unable to get you. Can you post some codding snippets, clarifying your solution
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Screenshot of scrollable web page

Unfortunately I don't really have any code snippets to share..

 

The general thoughts are:

 

1) take screen shot of existing visible screen

2) Scroll the screen through code until the non visible part is visible

3) take another screen shot of the visible screen and append the image to the first screen shot

4) Continue this process until you have reached the bottom of the scrollable area

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
kkavithabp
Posts: 3
Registered: ‎08-11-2010
My Device: Not Specified

Re: Screenshot of scrollable web page

Hi,

 

I need to capture screenshot of full webpage in blackberry.

 

I tried searching in net,they say Display.getScreenshot() is the only option avaliable to get screen capture.

 

I tried scrolling webpage from program and take screenshot.

 

But it is visible to user when we scroll.

 

Is there any other option wherein we render url in back and take screenshot?

 

Please help as this is very urgent.

 

Thanks

Kavitha