vb.net,打印,隐藏页眉和页脚 [英] vb.net, print ,hide header and footer

查看:123
本文介绍了vb.net,打印,隐藏页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打印发票时我无法隐藏页眉和页脚。

i不想显示打印的网址和页码



下面是我的代码



i am not able to hide header and footer while printing invoice.
i dont want to show url and page number in print

below is my code

Dim strScript As String = "<script language=JavaScript>"
            strScript += "window.print();"

推荐答案

参考 - Re:如何删除打印中的路径和日期??? [ ^ ]。

Refer - Re: How to remove path and date in printing???[^].
引用:

请清楚解释一下您的要求。从我收集到的内容,你得到的东西,如 http://www.mysite.com/somepage.aspx ,第1/1页和打印后页面页眉/页脚中的日期。这是正确的吗?如果是这样,[正如我之前所说],从asp.net控制输出(或删除)页眉/页脚是不可能的。它完全取决于浏览器的页面布局设置。你不能改变它。如果使用window.print(),除非用户更改其浏览器设置,否则这些文本将在打印中。如果您不需要它们,您有三种选择:



1.要求用户更改其浏览器设置(不切实际)



2.使用报告插件/打印插件。



3.使用像itextsharp这样的pdf格式输出。



我希望你理解。

Please explain your requirements a little clearly. From what I gather, your getting stuff like "http://www.mysite.com/somepage.aspx", "page 1/1" and the date int the page header/footer after printing. Is this right? If so, [as i said before], it is NOT POSSIBLE to control the output (or remove) the header/footer from asp.net. It is entirely dependant on the browser's page layout settings. You CAN NOT change that. If you use window.print(), those texts will be in the print unless the user changes their browser's settings. If you don't want them, you have three options:

1. Request user to change their browser settings (impractical)

2. Use a reporting plugin / printing plugin.

3. Give them output in pdf format using something like itextsharp.

I hope you understand.


这篇关于vb.net,打印,隐藏页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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