Struct chrome_remote_interface_model::page::PrintToPdfCommandBuilder[][src]

pub struct PrintToPdfCommandBuilder { /* fields omitted */ }
This is supported on crate features Page and Debugger and DOM and IO and Network and Runtime only.

Implementations

impl PrintToPdfCommandBuilder[src]

pub fn landscape(&mut self, v: bool) -> &mut Self[src]

Paper orientation. Defaults to false.

Display header and footer. Defaults to false.

pub fn print_background(&mut self, v: bool) -> &mut Self[src]

Print background graphics. Defaults to false.

pub fn scale(&mut self, v: f64) -> &mut Self[src]

Scale of the webpage rendering. Defaults to 1.

pub fn paper_width(&mut self, v: f64) -> &mut Self[src]

Paper width in inches. Defaults to 8.5 inches.

pub fn paper_height(&mut self, v: f64) -> &mut Self[src]

Paper height in inches. Defaults to 11 inches.

pub fn margin_top(&mut self, v: f64) -> &mut Self[src]

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

pub fn margin_bottom(&mut self, v: f64) -> &mut Self[src]

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

pub fn margin_left(&mut self, v: f64) -> &mut Self[src]

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

pub fn margin_right(&mut self, v: f64) -> &mut Self[src]

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

pub fn page_ranges(&mut self, v: String) -> &mut Self[src]

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

pub fn ignore_invalid_page_ranges(&mut self, v: bool) -> &mut Self[src]

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

pub fn header_template(&mut self, v: String) -> &mut Self[src]

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

For example, <span class=title></span> would generate span containing the title.

pub fn footer_template(&mut self, v: String) -> &mut Self[src]

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

pub fn prefer_css_page_size(&mut self, v: bool) -> &mut Self[src]

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.

pub fn transfer_mode(&mut self, v: PrintToPdfCommandTransferMode) -> &mut Self[src]

This is supported on crate feature experimental only.

return as stream

pub fn build(&mut self) -> Result<PrintToPdfCommand, &'static str>[src]

Trait Implementations

impl Clone for PrintToPdfCommandBuilder[src]

impl Debug for PrintToPdfCommandBuilder[src]

impl Default for PrintToPdfCommandBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.