Playwright::Page::PdfOptions
Inherits JSON::Serializable / Reference / Object
Constructors
Instance methods
Paper format. If set, takes priority over width or height options. Defaults to 'Letter'.
Paper format. If set, takes priority over width or height options. Defaults to 'Letter'.
HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
'date'formatted print date'title'document title'url'document location'pageNumber'current page number'totalPages'total pages in the document
HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
'date'formatted print date'title'document title'url'document location'pageNumber'current page number'totalPages'total pages in the document
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
The file path to save the PDF to. If 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.
The file path to save the PDF to. If 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.
Give any CSS @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.
Give any CSS @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.
Print background graphics. Defaults to false.
Scale of the webpage rendering. Defaults to 1. Scale amount must be between 0.1 and 2.