chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.page / PrintToPDFRequest

PrintToPDFRequest

data class PrintToPDFRequest

Request object containing input parameters for the PageDomain.printToPDF command.

Constructors

<init>

Request object containing input parameters for the PageDomain.printToPDF command.

PrintToPDFRequest(landscape: Boolean? = null, displayHeaderFooter: Boolean? = null, printBackground: Boolean? = null, scale: Double? = null, paperWidth: Double? = null, paperHeight: Double? = null, marginTop: Double? = null, marginBottom: Double? = null, marginLeft: Double? = null, marginRight: Double? = null, pageRanges: String? = null, ignoreInvalidPageRanges: Boolean? = null, headerTemplate: String? = null, footerTemplate: String? = null, preferCSSPageSize: Boolean? = null, transferMode: String? = null)

Properties

displayHeaderFooter

Display header and footer. Defaults to false.

val displayHeaderFooter: Boolean?

footerTemplate

HTML template for the print footer. Should use the same format as the headerTemplate.

val footerTemplate: String?

headerTemplate

HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:

val headerTemplate: String?

ignoreInvalidPageRanges

Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.

val ignoreInvalidPageRanges: Boolean?

landscape

Paper orientation. Defaults to false.

val landscape: Boolean?

marginBottom

Bottom margin in inches. Defaults to 1cm (~0.4 inches).

val marginBottom: Double?

marginLeft

Left margin in inches. Defaults to 1cm (~0.4 inches).

val marginLeft: Double?

marginRight

Right margin in inches. Defaults to 1cm (~0.4 inches).

val marginRight: Double?

marginTop

Top margin in inches. Defaults to 1cm (~0.4 inches).

val marginTop: Double?

pageRanges

Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.

val pageRanges: String?

paperHeight

Paper height in inches. Defaults to 11 inches.

val paperHeight: Double?

paperWidth

Paper width in inches. Defaults to 8.5 inches.

val paperWidth: Double?

preferCSSPageSize

Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.

val preferCSSPageSize: Boolean?

printBackground

Print background graphics. Defaults to false.

val printBackground: Boolean?

scale

Scale of the webpage rendering. Defaults to 1.

val scale: Double?

transferMode

return as stream

val transferMode: String?