Screen-shooting large web pages
I wonder if this can be done in VB.
I'd like to make a screen capture of, say, a web page that doesn't fit into the screen and has a vertical scrollbar at the right side. Perhaps the current screen could be captured, a message could be passed to the other app (e.g. Firefox) to have it scroll down and so on?
I posted a similar question in the general pc forum here.
Re: Screen-shooting large web pages
It IS possible, however, it is also VERY difficult (and beyond my scope)
Appart from subclassing the Browser, you'll have to also subclass the scrollbars, and calculate the increment and ranges so you know HOW much to scroll by, and how much pixels it moves the web page with every indent...
Re: Screen-shooting large web pages
..alternate idea1: (may be more convoluted :D)
Install a PDF/PS printer. Set it as default.
Print the webpage using that printer driver from Webbrowser control.
Now, convert (print) the ps/pdf file to jpeg using GhostScript. (command line)
..alternate idea2:
Convert the webpage to RTF. (Word Automation maybe able to do it. Not sure)
Load the RTF file in a RTB and make it VERY large.
Then print the contents of rtf to a picturebox using SelPrint method.
VB Code:
RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.AutoRedraw = True
RTB.SelPrint Picture1.hDC
Picture1.Picture = Picture1.Image
Re: Screen-shooting large web pages
Quote:
Originally Posted by iPrank
..alternate idea1: (may be more convoluted :D)
Install a PDF/PS printer. Set it as default.
Print the webpage using that printer driver from Webbrowser control.
Now, convert (print) the ps/pdf file to jpeg using GhostScript. (command line)
..alternate idea2:
Convert the webpage to RTF. (Word Automation maybe able to do it. Not sure)
Load the RTF file in a RTB and make it VERY large.
Then print the contents of rtf to a picturebox using SelPrint method.
VB Code:
RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.AutoRedraw = True
RTB.SelPrint Picture1.hDC
Picture1.Picture = Picture1.Image
Yor first approach is ok, I often use pdf995. But, for now I don't like the idea of installing Ghostscript. I precisely uninstalled it recently as I wasn't using it.
The second idea seems more interesting. I suppose I'll have to play around with the rtb and picture dimensions.