| Modifier and Type | Field and Description |
|---|---|
Boolean |
displayHeaderFooter
Display header and footer.
|
String |
footerTemplate
HTML template for the print footer.
|
String |
format
Paper format.
|
String |
headerTemplate
HTML template for the print header.
|
String |
height
Paper height, accepts values labeled with units.
|
Boolean |
landscape
Paper orientation.
|
Margin |
margin
Paper margins, defaults to none.
|
String |
pageRanges
Paper ranges to print, e.g., '1-5, 8, 11-13'.
|
Path |
path
The file path to save the PDF to.
|
Boolean |
preferCSSPageSize
Give any CSS
@page size declared in the page priority over what is declared in width and height or format
options. |
Boolean |
printBackground
Print background graphics.
|
Double |
scale
Scale of the webpage rendering.
|
String |
width
Paper width, accepts values labeled with units.
|
| Constructor and Description |
|---|
PdfOptions() |
| Modifier and Type | Method and Description |
|---|---|
Page.PdfOptions |
setDisplayHeaderFooter(boolean displayHeaderFooter) |
Page.PdfOptions |
setFooterTemplate(String footerTemplate) |
Page.PdfOptions |
setFormat(String format) |
Page.PdfOptions |
setHeaderTemplate(String headerTemplate) |
Page.PdfOptions |
setHeight(String height) |
Page.PdfOptions |
setLandscape(boolean landscape) |
Page.PdfOptions |
setMargin(Margin margin) |
Page.PdfOptions |
setPageRanges(String pageRanges) |
Page.PdfOptions |
setPath(Path path) |
Page.PdfOptions |
setPreferCSSPageSize(boolean preferCSSPageSize) |
Page.PdfOptions |
setPrintBackground(boolean printBackground) |
Page.PdfOptions |
setScale(double scale) |
Page.PdfOptions |
setWidth(String width) |
public Boolean displayHeaderFooter
false.public String footerTemplate
headerTemplate.public String format
width or height options. Defaults to 'Letter'.public String headerTemplate
"date" formatted print date"title" document title"url" document location"pageNumber" current page number"totalPages" total pages in the documentpublic String height
public Boolean landscape
false.public Margin margin
public String pageRanges
public Path path
path is a relative path, then it is resolved relative to the current working
directory. If no path is provided, the PDF won't be saved to the disk.public Boolean preferCSSPageSize
@page size declared in the page priority over what is declared in width and height or format
options. Defaults to false, which will scale the content to fit the paper size.public Boolean printBackground
false.public Double scale
1. Scale amount must be between 0.1 and 2.public String width
public Page.PdfOptions setDisplayHeaderFooter(boolean displayHeaderFooter)
public Page.PdfOptions setFooterTemplate(String footerTemplate)
public Page.PdfOptions setFormat(String format)
public Page.PdfOptions setHeaderTemplate(String headerTemplate)
public Page.PdfOptions setHeight(String height)
public Page.PdfOptions setLandscape(boolean landscape)
public Page.PdfOptions setMargin(Margin margin)
public Page.PdfOptions setPageRanges(String pageRanges)
public Page.PdfOptions setPath(Path path)
public Page.PdfOptions setPreferCSSPageSize(boolean preferCSSPageSize)
public Page.PdfOptions setPrintBackground(boolean printBackground)
public Page.PdfOptions setScale(double scale)
public Page.PdfOptions setWidth(String width)
Copyright © 2021. All rights reserved.