无法使用C#打印网页.. [英] Unable to print web page using C#..

查看:63
本文介绍了无法使用C#打印网页..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用C#打印网页,但程序只打印目标网页的HTML代码,而不是要打印的目标页面。



我的尝试:



一切.................... .............................................: - (

解决方案

HTML代码 网页:为了使其可见或可打印,它需要要渲染 - 这就是浏览器用它做的事情。



你可以很容易地渲染它,并且它没有必要显示它才能工作:在C#中打印格式化的HTML页面 - Stack Overflow [ ^ ]

Tried printing a web page using C#, but the program is printing only the HTML code of the targeted web page, instead of the targeted page to be printed.

What I have tried:

Everything................................................................. :-(

解决方案

The HTML code is the webpage: in order to make it "visible" or "printable" it needs to be rendered - which is what a browser does with it.

You can render it fairly easily though, and it isn;t necessary to display it for that to work: Printing a formatted HTML page in C# - Stack Overflow[^]


这篇关于无法使用C#打印网页..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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