将ASP div保存为C#中的图像? [英] Save ASP div as image in C# ?

查看:53
本文介绍了将ASP div保存为C#中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何将asp div及其内容作为图像保存到我的电脑

使用c#代码?

请任何想法: )



非常感谢



我的尝试:



hi
how can i save asp div and its contents as image to my pc
using c# code ?
please any idea :)

thanks alot

What I have tried:

hi 
how can i save asp div and its contents as image to my pc 
using c# code ?
please any idea :)

thanks alot

推荐答案

LMGTFY [ ^ ]


您需要使用的是某种HTML到PNG助手,将您的HTML内容转换为PNG格式(或任何其他图像格式)。您可以实现各种方法,例如将HTML内容写入画布,然后将该画布内容另存为图像......还有更多可用选项。



查看以下选项,(其他选项搜索, html to png converter

HTML2Canvas [ ^ ]

html to png - CloudConvert [ ^ ]



您不能指望浏览器根据HTML内容生成图像,这不是软件的功能之一。 :-)



对于C#,您需要使用库,我到目前为止使用的大多数库都是付费的,并且在免费版中不提供太多。
What you need to use is some sort of HTML to PNG helper, that converts your HTML content to PNG format (or any other image format). There are various methods that you can implement, such as writing the HTML content to a canvas and then saving that canvas content as an image... Much more options available.

Have a look at the following options, (for other options search for, "html to png converter")
HTML2Canvas[^]
html to png - CloudConvert[^]

You cannot expect the browser to generate the image based on the HTML content, that is just not one of the features of the software. :-)

As for C#, you would need to use libraries, and most of the libraries that I have used until now are all paid, and in the free edition don't offer much.


参考这些

html2canvas将DOM保存为图像 [ ^ ]

如何使用HTML2canvas将img保存到用户的本地计算机 [ ^ ]

将div保存为图像 [ ^ ]
refer these
html2canvas save DOM as image [^]
How to save img to user's local computer using HTML2canvas[^]
Save div as image [^]


这篇关于将ASP div保存为C#中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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