使用powershell自动打印html文件
我想使用 powershell 将 html 文件打印到默认打印机。假设我有文件 c:\test.html ,其中包含以下文本:
<html>
<p> hello <b>world</b></p>
<html>
如何将 test.html 打印到默认打印机?
先感谢您。
I want to print an html file to the default printer with powershell. So lets say I have the file c:\test.html with the text:
<html>
<p> hello <b>world</b></p>
<html>
How could I print test.html to the default printer?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
打印到默认打印机。
编辑:
如果您需要打印渲染的 html 页面:
在注释后编辑:
我可以在 testprint.ps1 文件中运行它:
Print to default printer.
Edit:
if you need print rendered htlm page:
Edit after comments:
I can run this in a testprint.ps1 file: