将div内容转换为图像 [英] convert div contents to image

查看:121
本文介绍了将div内容转换为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我有一个DIV容器,其中包含一些文本,背景图像,图像.我需要将整个DIV内容转换为图像并保存到本地文件夹中.
请指导我如何使用JavaScript或C#将Div内容转换为图像.
我已经在Google中搜索过,但没有得到正确的结果.请提供一些源代码..帮帮我.

hi friends,
I have a DIV container which has some text, background-image, image. I need to convert that whole DIV contents into image and save into local folder.
Please guide me how to convert Div contents to Image using JavaScript or C#.
I have searched in Google, but not getting correct result. give some source code please.. help me guys.

推荐答案

您无法在浏览器的客户端上轻松做到这一点.您将需要一个插件或一个小程序".在服务器端更容易,并且在页面上具有指向图像生成器部件的链接-但仅当它是您的Web应用程序时.
You cannot do this easy on the client side in a browser. You would need a plugin or an "applet". It is easier on server side and have a link on the page to the image generator part - but only if it is your web app.


请尝试以下http://www.hiqpdf.com/demo/ConvertHtmlToImage.aspx [

这篇关于将div内容转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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