pub struct PrintToPdfCommand { /* private fields */ }Page and Debugger and DOM and IO and Network and Runtime only.Expand description
Print page as PDF.
Implementations§
Source§impl PrintToPdfCommand
impl PrintToPdfCommand
pub fn builder() -> PrintToPdfCommandBuilder
Display header and footer. Defaults to false.
Sourcepub fn print_background(&self) -> Option<&bool>
pub fn print_background(&self) -> Option<&bool>
Print background graphics. Defaults to false.
Sourcepub fn paper_width(&self) -> Option<&f64>
pub fn paper_width(&self) -> Option<&f64>
Paper width in inches. Defaults to 8.5 inches.
Sourcepub fn paper_height(&self) -> Option<&f64>
pub fn paper_height(&self) -> Option<&f64>
Paper height in inches. Defaults to 11 inches.
Sourcepub fn margin_top(&self) -> Option<&f64>
pub fn margin_top(&self) -> Option<&f64>
Top margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_bottom(&self) -> Option<&f64>
pub fn margin_bottom(&self) -> Option<&f64>
Bottom margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_left(&self) -> Option<&f64>
pub fn margin_left(&self) -> Option<&f64>
Left margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_right(&self) -> Option<&f64>
pub fn margin_right(&self) -> Option<&f64>
Right margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn page_ranges(&self) -> Option<&String>
pub fn page_ranges(&self) -> Option<&String>
Paper ranges to print, e.g., ‘1-5, 8, 11-13’. Defaults to the empty string, which means print all pages.
Sourcepub fn ignore_invalid_page_ranges(&self) -> Option<&bool>
pub fn ignore_invalid_page_ranges(&self) -> Option<&bool>
Whether to silently ignore invalid but successfully parsed page ranges, such as ‘3-2’. Defaults to false.
Sourcepub fn header_template(&self) -> Option<&String>
pub fn header_template(&self) -> Option<&String>
HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
date: formatted print datetitle: document titleurl: document locationpageNumber: current page numbertotalPages: total pages in the document
For example, <span class=title></span> would generate span containing the title.
HTML template for the print footer. Should use the same format as the headerTemplate.
Sourcepub fn prefer_css_page_size(&self) -> Option<&bool>
pub fn prefer_css_page_size(&self) -> Option<&bool>
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.
Sourcepub fn transfer_mode(&self) -> Option<&PrintToPdfCommandTransferMode>
Available on crate feature experimental only.
pub fn transfer_mode(&self) -> Option<&PrintToPdfCommandTransferMode>
experimental only.return as stream
Trait Implementations§
Source§impl Clone for PrintToPdfCommand
impl Clone for PrintToPdfCommand
Source§fn clone(&self) -> PrintToPdfCommand
fn clone(&self) -> PrintToPdfCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more