如何在ASP.NET C#中将HTML转换为图像文件 [英] How to convert HTML into image file in ASP.NET C#

查看:67
本文介绍了如何在ASP.NET C#中将HTML转换为图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下HTML



I have the following html

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Happy Birthday</title>
</head>

<body background="http://172.17.200.54/Bday_Mail_Template/BG_2.jpg">
    <div style='width: 100%; height: auto; float: left;'>
        <div style='font-size: 24px; width: 100%; float: left;'>
            Dear User,
        </div>
        <div style='font-size: 22px; line-height: 50px; width: 100%; float: left; text-align: center; margin-top: 40px;'>
            Wish you a very happy Birth day.
        </div>
        <div style='font-size: 18px; letter-spacing: 1px; font-style: italic; width: 100%; float: left; margin-top: 50px;'>
            Best Wishes,
            <br />
            HR Team<br />
             Test Company Ltd
            <br /><br />
            <span style="color:Red;">***Note - </span> This is a system generated email,please do not reply.
        </div>
    </div>
</body>
</html>





我尝试过:



我正在尝试将html转换为图片但不能



What I have tried:

I am trying to convert html to image but can't

推荐答案

谷歌是你的朋友......找到以下链接使用此搜索: c#将html转换为图片 - Google [ ^ ]



* c# - 将HTML字符串转换为图像 - Stack Overflow [ ^ ]
Google is your friend... Found the link below with this search: c# convert html to image - Google[^]

* c# - Convert HTML string to image - Stack Overflow[^]


这篇关于如何在ASP.NET C#中将HTML转换为图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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