PrintToPDFParameter

@Serializable
data class PrintToPDFParameter(val landscape: Boolean? = null, val displayHeaderFooter: Boolean? = null, val printBackground: Boolean? = null, val scale: Double? = null, val paperWidth: Double? = null, val paperHeight: Double? = null, val marginTop: Double? = null, val marginBottom: Double? = null, val marginLeft: Double? = null, val marginRight: Double? = null, val pageRanges: String? = null, val headerTemplate: String? = null, val footerTemplate: String? = null, val preferCSSPageSize: Boolean? = null, val transferMode: String? = null, val generateTaggedPDF: Boolean? = null, val generateDocumentOutline: Boolean? = null)

Constructors

Link copied to clipboard
constructor(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, headerTemplate: String? = null, footerTemplate: String? = null, preferCSSPageSize: Boolean? = null, transferMode: String? = null, generateTaggedPDF: Boolean? = null, generateDocumentOutline: Boolean? = null)

Properties

Link copied to clipboard

Display header and footer. Defaults to false.

Link copied to clipboard
val footerTemplate: String? = null

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

Link copied to clipboard

Whether or not to embed the document outline into the PDF.

Link copied to clipboard

Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.

Link copied to clipboard
val headerTemplate: String? = null

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

Link copied to clipboard
val landscape: Boolean? = null

Paper orientation. Defaults to false.

Link copied to clipboard
val marginBottom: Double? = null

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

Link copied to clipboard
val marginLeft: Double? = null

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

Link copied to clipboard
val marginRight: Double? = null

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

Link copied to clipboard
val marginTop: Double? = null

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

Link copied to clipboard
val pageRanges: String? = null

Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.

Link copied to clipboard
val paperHeight: Double? = null

Paper height in inches. Defaults to 11 inches.

Link copied to clipboard
val paperWidth: Double? = null

Paper width in inches. Defaults to 8.5 inches.

Link copied to clipboard

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.

Link copied to clipboard

Print background graphics. Defaults to false.

Link copied to clipboard
val scale: Double? = null

Scale of the webpage rendering. Defaults to 1.

Link copied to clipboard
val transferMode: String? = null

return as stream