当用户选择“打印”时,如何在横向打印HTML页面? [英] How do I make an HTML page print in landscape when the user selects 'print'?

查看:301
本文介绍了当用户选择“打印”时,如何在横向打印HTML页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们生成应始终以横向模式打印的网页。 Web浏览器打印对话框默认为纵向,因此对于每个打印作业,用户必须手动选择横向。这很不重要,但如果我们可以移除这个不必要的步骤,对用户来说会很好。

感谢所有受访者。

解决方案

表示它不是真的支持。有不止一些人试图破解 的方式它 - 但我强烈建议只渲染服务器端PDF。


We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step.

Thanks in advance to all respondents.

解决方案

A quick Google indicates that it's not really supported. There's more than a few folks out there trying to hack their way to it - but I'd strongly suggest just rendering a server side PDF instead.

这篇关于当用户选择“打印”时,如何在横向打印HTML页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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