The type
tabs.PageSettings
is used to control how a tab is rendered as a PDF by the
tabs.saveAsPDF()
方法。
All its properties are optional.
For setting headers and footers, you can include certain special characters in the strings you supply. These will be replaced in the rendered output as follows:
Values of this type are objects. They contain the following properties:
edgeBottom
可选
编号
. The spacing between the bottom of the footers and the bottom edge of the paper (inches). Default: 0.
edgeLeft
可选
编号
. The spacing between the left header/footer and the left edge of the paper (inches). Default: 0.
edgeRight
可选
编号
. The spacing between the right header/footer and the left edge of the paper (inches). Default: 0.
edgeTop
可选
编号
. The spacing between the top of the headers and the top edge of the paper (inches). Default: 0
footerCenter
可选
string
. The text for the page's center footer. Default: ''.
footerLeft
可选
string
. The text for the page's left footer. Default: '&PT'.
footerRight
可选
string
. The text for the page's right footer. Default: '&D'.
headerCenter
可选
string
. The text for the page's center header. Default: ''.
headerLeft
可选
string
. The text for the page's left header. Default: '&T'.
headerRight
可选
string
. The text for the page's right header. Default: '&U'.
marginBottom
可选
编号
. The margin between the page content and the bottom edge of the paper (inches). Default: 0.5.
marginLeft
可选
编号
. The margin between the page content and the left edge of the paper (inches). Default: 0.5.
marginRight
可选
编号
. The margin between the page content and the right edge of the paper (inches). Default: 0.5.
marginTop
可选
编号
. The margin between the page content and the top edge of the paper (inches). Default: 0.5.
orientation
可选
integer
. Page orientation: 0 means "portrait", 1 means "landscape". Default: 0.
paperHeight
可选
编号
. The paper height in paper size units. Default: 11.0.
paperSizeUnit
可选
integer
. The paper size unit: 0 = inches, 1 = millimeters. Default: 0.
paperWidth
可选
编号
. The paper width in paper size units. Default: 8.5.
scaling
可选
编号
. Page content scaling factor. 1 means 100% or normal size. Default: 1.
showBackgroundColors
可选
boolean
. Whether the page background colors should be shown. Default: false.
showBackgroundImages
可选
boolean
. Whether the page background images should be shown. Default: false.
shrinkToFit
可选
boolean
. Whether the page content should shrink to fit the page width (overrides scaling). Default: true.
toFileName
可选
string
. The name of the file the PDF is saved in, with or without the
.pdf
extension.
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者