contents.print翻译解析

编程入门 行业动态 更新时间:2024-10-25 00:28:23

<a href=https://www.elefans.com/category/jswz/34/1731492.html style=contents.print翻译解析"/>

contents.print翻译解析

contents.print([options], [callback])
options Object (可选)
silent boolean (optional) - 不要求用户进行打印设置. 默认值为 false.
printBackground boolean (optional) - 打印网页的背景色和图像。. 默认值为 false.
deviceName string (optional) - 设置要使用的打印机设备名称。必须是系统定义的名称,而不是“友好”名称, e.g ‘Brother_QL_820NWB’ and not ‘Brother QL-820NWB’.
color boolean (optional) - Set whether the printed web page will be in color or grayscale. 默认值为 true。
margins Object (可选)
marginType string (optional) - 可以是default, none, printableArea, or custom。如果选择了custom,则还需要指定top, bottom, left, and right
top number (optional) - 打印网页的上边距,以像素为单位.
bottom number (optional) - 打印网页的下边距,以像素为单位.
left number (optional) - 打印网页的左边距,以像素为单位
right number (optional) - 打印网页的右边距,以像素为单位
landscape boolean (optional) - 是否应以横向模式打印网页. 默认值为 false.
scaleFactor number (optional) - 网页的比例因子.
pagesPerSheet number (optional) - 每页要打印的页数.
collate boolean (optional) - 是否应对网页进行整理.
copies number (optional) - 要打印的网页的副本数.
pageRanges Object[] (可选) - 要打印的页面范围。 在macOS上,只有数组的第一个值被信任。
from number - 要打印的第一页的索引 (0-based).
to number - 要打印的最后一页的索引(包括索引) (0-based).
duplexMode string (optional) - 设置打印网页的双面模式. 可以是 simplex、shortEdge 或 longEdge。
dpi Record<string, number> (optional)
horizontal number (optional) - 水平dpi.
vertical number (optional) - 垂直dpi.
header string (optional) - 要打印为页眉的字符串.
footer string (optional) - 要打印为页脚的字符串.
pageSize string | Size (optional) - 指定打印文档的页面大小。可以是A0、A1、A2、A3、A4、A5、A6、Legal、Letter、Tabloid或包含高度和宽度的对象.
callback Function (可选)
success boolean - 表示调用打印成功。
failureReason string - 如果打印失败,则回调错误说明。

更多推荐

contents.print翻译解析

本文发布于:2023-12-03 11:05:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1654663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:contents   print

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!