web浏览器类 - 如何在不页眉/页脚打印文档? [英] WebBrowser class - how to print document without header/footer?

查看:256
本文介绍了web浏览器类 - 如何在不页眉/页脚打印文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 web浏览器类打开文档,变化值,保存和打印。现在的问题是,它打印文档,包括标题(第1页1)和页脚(文档+日根)

I'm using the WebBrowser class to open document, change values, save and print. The problem is, that it prints the document including the header("Page 1 of 1") and footer(root of the document + date)

我看了一下资料,并没有找到一种方法将其删除。它甚至有可能使用 web浏览器或者我应该寻找替代品?

I looked at the documentation and didn't find a way to remove them. Is it even possible using WebBrowser or should I look for alternatives?

推荐答案

有一个解决方案,可能不会因为清洁剂,因为它可能是。由于web浏览器inhertis它的设置从Internet Explorer,可以更改注册表中的值。幸运的是,值HKCU下,因此不需要管理权限。

There is a solution, probably not as cleaner as it could have been. Since WebBrowser inhertis it's settings from Internet Explorer it is possible to change the values in the registry. Luckily the values are under HKCU so no administration permissions are needed.

看看 http://stackoverflow.com/a/1321314/1630928

这篇关于web浏览器类 - 如何在不页眉/页脚打印文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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