屏幕短整页System.Windows.Forms不起作用 [英] Screen Short of entire page System.Windows.Forms not working
本文介绍了屏幕短整页System.Windows.Forms不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了参考
System.Windows.Forms
来创建Screen Short of整个页面,但当我在服务器或IIS屏幕上部署它时,短时间没有生成
I have added Reference of
System.Windows.Forms
to create Screen Short of entire page but when i deploy it on server or IIS screen short is not getting generating
推荐答案
如果添加对System.Windows的引用。表格
,屏幕截图是在服务器端,因此,运行ASP.NET应用程序的计算机。但你想拍摄客户端的屏幕截图:浏览器中呈现的页面。
你能做的最好的事情是将您的页面转换为PDF而不是图像:
http://www.c-sharpcorner.com/UploadFile/9f0ae2/convert-aspx-page-into-pdf-in-Asp-Net/ [ ^ ]
http://www.aspsnippets.com/Articles/Export-ASPNet-Web-Page-with-images-to-PDF-using-ITextsharp.aspx [ ^ ]
If you add a reference toSystem.Windows.Forms
, the screen shot is taken at the server side, so, the computer that runs your ASP.NET application. But you want to take a screen shot of the client-side: the rendered page in the browser.
The best thing you can do is to convert your page to a PDF instead of an image:
http://www.c-sharpcorner.com/UploadFile/9f0ae2/convert-aspx-page-into-pdf-in-Asp-Net/[^]
http://www.aspsnippets.com/Articles/Export-ASPNet-Web-Page-with-images-to-PDF-using-ITextsharp.aspx[^]
这篇关于屏幕短整页System.Windows.Forms不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文