Results 1 to 4 of 4

Thread: Screen-shooting large web pages

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    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.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    Hyperactive Member
    Join Date
    Feb 2003
    Location
    Grenada
    Posts
    346

    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...
    If my post has been helpful, then please rate it accordingly...
    If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.

  3. #3
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: Screen-shooting large web pages

    ..alternate idea1: (may be more convoluted )

    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:
    1. RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
    2. Picture1.Move  0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
    3. Picture1.AutoRedraw = True
    4. RTB.SelPrint Picture1.hDC
    5. Picture1.Picture = Picture1.Image
    Last edited by iPrank; Apr 12th, 2006 at 04:06 AM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Screen-shooting large web pages

    Quote Originally Posted by iPrank
    ..alternate idea1: (may be more convoluted )

    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:
    1. RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
    2. Picture1.Move  0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
    3. Picture1.AutoRedraw = True
    4. RTB.SelPrint Picture1.hDC
    5. 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.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width