pub struct PrintToPdfCommandBuilder { /* private fields */ }Page and Debugger and DOM and IO and Network and Runtime only.Implementations§
Source§impl PrintToPdfCommandBuilder
impl PrintToPdfCommandBuilder
Display header and footer. Defaults to false.
Sourcepub fn print_background(&mut self, v: bool) -> &mut Self
pub fn print_background(&mut self, v: bool) -> &mut Self
Print background graphics. Defaults to false.
Sourcepub fn paper_width(&mut self, v: f64) -> &mut Self
pub fn paper_width(&mut self, v: f64) -> &mut Self
Paper width in inches. Defaults to 8.5 inches.
Sourcepub fn paper_height(&mut self, v: f64) -> &mut Self
pub fn paper_height(&mut self, v: f64) -> &mut Self
Paper height in inches. Defaults to 11 inches.
Sourcepub fn margin_top(&mut self, v: f64) -> &mut Self
pub fn margin_top(&mut self, v: f64) -> &mut Self
Top margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_bottom(&mut self, v: f64) -> &mut Self
pub fn margin_bottom(&mut self, v: f64) -> &mut Self
Bottom margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_left(&mut self, v: f64) -> &mut Self
pub fn margin_left(&mut self, v: f64) -> &mut Self
Left margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn margin_right(&mut self, v: f64) -> &mut Self
pub fn margin_right(&mut self, v: f64) -> &mut Self
Right margin in inches. Defaults to 1cm (~0.4 inches).
Sourcepub fn page_ranges(&mut self, v: String) -> &mut Self
pub fn page_ranges(&mut self, v: String) -> &mut Self
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(&mut self, v: bool) -> &mut Self
pub fn ignore_invalid_page_ranges(&mut self, v: bool) -> &mut Self
Whether to silently ignore invalid but successfully parsed page ranges, such as ‘3-2’. Defaults to false.
Sourcepub fn header_template(&mut self, v: String) -> &mut Self
pub fn header_template(&mut self, v: String) -> &mut Self
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(&mut self, v: bool) -> &mut Self
pub fn prefer_css_page_size(&mut self, v: bool) -> &mut Self
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(&mut self, v: PrintToPdfCommandTransferMode) -> &mut Self
Available on crate feature experimental only.
pub fn transfer_mode(&mut self, v: PrintToPdfCommandTransferMode) -> &mut Self
experimental only.return as stream
pub fn build(&mut self) -> Result<PrintToPdfCommand, &'static str>
Trait Implementations§
Source§impl Clone for PrintToPdfCommandBuilder
impl Clone for PrintToPdfCommandBuilder
Source§fn clone(&self) -> PrintToPdfCommandBuilder
fn clone(&self) -> PrintToPdfCommandBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more