使用javascript以横向模式打印网页。在打印时,我想:
- 设置利润 <
- 景观模式/gh>
您可以使用 @page
CSS规则:
/* In CSS, not JavaScript */
@page {
size: A4 landscape;
margin: 42pt 12pt;
}
@media print {
/* Define print-specific styles here, for example toning down the decoration
of hyperlinks and removing the navigation. */
a {color: inherit !important; text-decoration: none !important;}
nav {display: none;}
}
然而,浏览器支持是参差不齐的-除了王子XML,只有IE8+和Opera支持它。如果您希望对打印进行精确的跨浏览器控制,可以考虑一种(通常是服务器端)PDF输出机制。
相关内容
- 谷歌表脚本-硬拷贝重复表和重命名
- 尝试使用列表推导式打印嵌套列表的第一个元素
- 如何从python应用程序打印硬拷贝
- 使用Python AST来确定字符串是否已硬编码到打印调用中
- Sympy:我能得到一个内置函数的显式打印吗
- 使用python打印pdf的特定页面的硬拷贝
- 对象中具有类实例的数组的硬拷贝
- Swift:向下投射一个硬拷贝对象,获得实例变量的默认值?
- 创建文件的硬拷贝并保持原始文件不变
- r - 如何在闪亮的应用程序中创建打印按钮,以打印用户输入文本框的文本的硬拷贝?
- 我有一个静态表单模板硬拷贝.我想在其中添加文本
- 在特征提取器中以西里尔式打印python
- 悬挂式C 打印形状来自字符串阵列
- CDN资产、安全、生产的硬拷贝
- 我如何在水平杆下方移动侧边栏式打印器
- 如何在硬拷贝上删除打印按钮
- 打印Biztalk编排的硬拷贝
- 如何在 Vim 中打印带有折叠的(硬拷贝)
- 打印按钮出现在 Java 中的实际硬拷贝上
- 使用横向模式打印到硬拷贝
最新更新
- SwiftUI:Foreach in List - 有什么优势?
- 如何加载所有转储附加的字典在python pickle?
- Jmeter语言 - 当前活动线程
- Java作用域问题:try-catch块,解析字符串到日期
- 如何在主应用中获得UWP应用服务的通知?
- 复选框的定位
- 弹簧启动-采用与2个ymls不同的属性
- Symfony 5.3+翻译提供商Crowdin不更新本地文件
- 从文本文件(.txt)中读取字节数组
- 如何下载完整的雅典娜查询结果到CSV文件
- pyspark:在执行join - restrict相同列名选择时设置别名
- 如何在Eclipse RCP中隐藏/删除Preferences对话框中的导入/导出按钮
- 在自定义jackson反序列化器中以响应式方式从db加载实体
- 使用RestSharp从API返回JSON数据
- OAuth同意屏幕不显示正确的AppName
- 使用ByRef更新记录集字段
- 提取多个XML文件中所有标签之间的文本,并将提取的文本复制到csv文件中
- 在Laravel和Vue之间共享数据的糟糕方式
- 可以在Azure Devops中找到需求文本文件
- 如何在tensorflow keras中引用ground truth变量?
- Json解析并分配给DTO
- 如何通过不重复结果来正确地循环一个范围
- 给出零最优值的AMPL程序
- 再次出现身份验证问题,GCP源存储库使用publickey
- 打印添加到数据库的记录数有问题
- 如何插入一行到一个表在sql是完全相同的另一个表,但只有一个列不同?
- 如何在jupyter notebook中导入两个或多个包?
- 对product类型的访问器进行泛型迭代
- 如何在 react 中"remember"昂贵的递归函数中先前计算的值?
- 在eclipse IDE上使用Tomcat服务器在本地机器上修复eclipse上的编译错误,我能做些什么?
热门标签:
javascript python java c# php android html jquery c++ css ios sql mysql arrays asp.net json python-3.x ruby-on-rails .net sql-server django objective-c excel regex ruby linux ajax iphone xml vba spring asp.net-mvc database wordpress string postgresql wpf windows xcode bash git oracle list vb.net multithreading eclipse algorithm macos powershell visual-studio image forms numpy scala function api selenium