在C#中转换网页到图像时遇到问题 [英] Getting issue when convert webpage-to-image in C#

查看:59
本文介绍了在C#中转换网页到图像时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将将网页转换为图片并将其保存在本地计算机上的代码是从以下链接获取的:将网页转换为ASP.NET图像。



此代码是我的本地机器工作正常,但在我们的测试机器中它没有得到导出。当我在我们的测试机器上调试时,我发现browser.ReadyState没有完成状态,它来到交互状态然后,它将从while循环退出并挂在m_thread.Join()











是否有其他代码将网页转换为图片而不使用线程?



请指导我要解决这个问题。

解决方案

你可以参考这两个链接解释并提供相同的代码。



使用C#图像捕获整个网页 [ ^ ]



如何使用C#捕获网页到图像 - C#示例代码 [ ^ ]



问候......:笑:

My code for Convert webpage into Image and save it in local machine is get it from this link:Convert webpage to image from ASP.NET.

This code is Works fine in My local machine,but in our Testing machine its doesn't get Exported. when i am debugging in our testing machine, i found browser.ReadyState does not comes to complete state,It comes to interactive state then ,it will exit from while loop and also hanging in m_thread.Join()





Is there any other code for convert webpage to Image without using thread?

Please guide me to do resolve that.

解决方案

Well you can refer to these two links which explains and provides code for the same.

Image Capture Whole Web Page using C#[^]

How to capture web page to image with C# - C# Sample Code[^]

Regards.. :laugh:


这篇关于在C#中转换网页到图像时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆