在 FireFox 和 IE 8 中打印横向或纵向 [英] Printing landscape or portrait in FireFox and IE 8
问题描述
目前我使用的是 FireFox 最新版本和 IE8
Currently I am using FireFox latest version and IE8
为了改变打印方向,我使用了
To change the orientation of printing , I used
@page {
size: portrait;
}
在我的 css 文件中.@page 参考
in my css file. @page reference
虽然它声称@page 在两种浏览器中都受支持,但经过我的测试,它除了 Chrome 之外根本不起作用.我想知道如何在 FireFox/IE8 中以不同方向打印页面.
Although it claims that the @page is supported in both browsers , after my testing it is not working at all besides Chrome. I would like to know how to print the page in different orientation in FireFox / IE8.
推荐答案
现在任何应用程序都不应该依赖此功能来跨浏览器工作,因为大多数浏览器仍在实施有关页面方向的 CSS3 标准.
No application should depend on this feature to work cross browser right now because the CSS3 standard on page orientation for printing is still under implementation in most browsers.
对于谷歌浏览器它工作得很好:http://dev.activisual.net/test.html
For Google Chrome it works just fine: http://dev.activisual.net/test.html
最终在打印过程中改变方向的决定会传递给用户(即使它有效),因此您可以简单地让用户知道他们应该以横向或纵向打印页面,但通常不会有'永远不会阻止用户在桌面浏览器上打印时更改方向.
Ultimately the decision of changing the orientation relays on the user during the printing process (even if it works), so you could simply let the users know that they should print the page in landscape or portrait, but in general there won´t ever by a way to prevent the users from changing the orientation while printing on desktop browsers.
这是最近报告的 FF 错误报告:https://bugzilla.mozilla.org/show_bug.cgi?id=851441
Here is a bug report for FF reported very recently: https://bugzilla.mozilla.org/show_bug.cgi?id=851441
您可以阅读有关此问题的已接受答案以供参考:HTML 横向打印
You can read the accepted answer on this question for reference: Landscape printing from HTML
这篇关于在 FireFox 和 IE 8 中打印横向或纵向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!