在 Windows 服务中制作 Tiff 图像
我有一个 Windows 服务,我需要从 XML + XSL 创建一个 tiff 图像。
我找到了一种方法来进行争吵,但这适用于网络浏览器和 DrawToBitmap。 但这在 Windows 服务中是不可能的,因为不可能在 Windows 服务中使用 Web 浏览器类。
为什么要用 C# 将 tiff 图像形成 XML?
I have a Windows Service and I need to create a tiff image form a XML + XSL.
I found a way to make a tiff but this works with a web browser and DrawToBitmap.
But this is not possible inside a Windows Service because it is not possible to use a web browser class inside a Windows service.
Is there a why to do make a tiff image form a XML with C#?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道你要对图像做什么,但要在 Windows 服务中动态创建图像:
添加对 System.Drawing 的引用,
尝试这种方式:
更新
你的方向是正确的使用
网络浏览器和DrawToBitmap
!要使用 WebBrowser,您需要包含using System.Windows.Forms;
并且必须在 System.Windows.Forms 中添加引用,这是一个示例:
http://www.codeproject.com/KB/graphics/html2image.aspx
更新
您还可以看这里:
HTML 到图像 .tiff 文件
或此处:
将 HTML 渲染为 TIFF
更新
我找到了这个:
http://code.msdn.microsoft.com/CSASPNETSaveWebpageToImage-5299048d
I don't know what you have to do with the image but to create an image on the fly in a windows service:
Add reference to System.Drawing
try this way:
update
You are in a right direction using
web browser and DrawToBitmap
! To use WebBrowser you need to includeusing System.Windows.Forms;
and you have to add reference at System.Windows.Formsthis is an example:
http://www.codeproject.com/KB/graphics/html2image.aspx
update
You can also look here:
HTML to Image .tiff File
or here:
Render HTML to TIFF
update
I've found this one:
http://code.msdn.microsoft.com/CSASPNETSaveWebpageToImage-5299048d