简体   繁体   中英

Capturing Full web page in asp.net

Want to take full web page screen shot. i have tried below code but it is taking only visible portion. i want to take full web page screenshot that is visible and invisible

here is my code

 protected void btnCapture_Click(object sender, EventArgs e)
{

    Capture("C:/Users/MintFDI/Downloads/ScreenShot.Jpeg");

}

  public static void Capture(String CapturedFilePath)
{
    try
    {
        Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
        Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
        graphics.CopyFromScreen(10, 65, 20, 25, bitmap.Size);
        bitmap.Save(CapturedFilePath, System.Drawing.Imaging.ImageFormat.Jpeg);
    }
    catch (Exception)
    {

        throw;
    }
    finally
    {

    }
}

看看Josh Close的ScreenShot Gist或CodeProject上dooskoobi的网页缩略图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM