簡體   English   中英

在asp.net中捕獲完整網頁

[英]Capturing Full web page in asp.net

想要拍攝完整的網頁屏幕截圖。 我試過下面的代碼,但它只占用可見部分。 我想獲取可見和不可見的完整網頁截圖

這是我的代碼

 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的網頁縮略圖

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM