Forum Moderators: phranque

Message Too Old, No Replies

how to save web page in Asp.net as screen shot

Need screen shot of browser page

         

Gautamjoshi

12:37 pm on Mar 16, 2006 (gmt 0)

10+ Year Member



Requirement is to save web page as image so i can use the screen shot image for power point presentation.

Please Help

steelegbr

12:42 pm on Mar 16, 2006 (gmt 0)

10+ Year Member



ALT+PRINTSCREEN to take a screenshot.

You can then paste directly into powerpoint from there.

If you want to edit out stuff or allow for multiple pages then just paste into paint and join the pages together.

Gautamjoshi

1:07 pm on Mar 16, 2006 (gmt 0)

10+ Year Member



Ageed but i want this web page screen shot through coding. so i can view full page.
Means along with area which is hidden in vertical scroll and horizontal scroll

vonragnor

9:04 pm on Mar 19, 2006 (gmt 0)

10+ Year Member



This is how I do it:

' start internet explorer with parameter(1) as page
' grab screen into picture001.jpg file name

Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshShell2 = WScript.CreateObject("WScript.Shell")

Return = WshShell.Run("cmd /c del c:\upload\picture0?.jpg", 3)
Return = WshShell.Run("cmd /c del c:\upload\picture.jpg", 3)

Set Args = WScript.Arguments

Return = WshShell.Run("c:\progra~1\intern~1\iexplore.exe -k " & args(0), 3)

WshShell.AppActivate "Internet Explorer"
WScript.Sleep 14000

'There are 6 levels of the JPEG compression.
' jpgs = JPEG Superb
' jpgh = JPEG High
' jpgg = JPEG Good
' jpgn = JPEG Normal
' jpga = JPEG Average
' jpgb = JPEG Bad

WshShell2.Run("C:\Progra~1\Howies~1\HQScreen.exe 0 jpgs 24 picture c:\upload\ 1")
WScript.Sleep 1000
WshShell.SendKeys "%{F4}"


' load the created picture
' and resize
' and save as "picture.jpg"

Set ctrl = createobject("GflAx.GflAx")

ctrl.enablelzw = True
ctrl.LoadBitmap "c:\upload\picture001.jpg"

ctrl.Saveformat = 1 ' AX_JPEG
ctrl.ChangeColorDepth AX_ToTrueColors

imageheight = ctrl.height
imagewidth = ctrl.width

newheight = 250
newWidth = (newHeight * ctrl.Width) / ctrl.Height
ctrl.Resize newWidth, newHeight

ctrl.savebitmap "c:\upload\picture.jpg"
set ctrl=nothing

' delete original picture001.jpg file

Return = WshShell.Run("cmd /c del c:\upload\picture001.jpg", 3)