pub struct PrintToPdfParams {Show 17 fields
pub landscape: Option<bool>,
pub display_header_footer: Option<bool>,
pub print_background: Option<bool>,
pub scale: Option<f64>,
pub paper_width: Option<f64>,
pub paper_height: Option<f64>,
pub margin_top: Option<f64>,
pub margin_bottom: Option<f64>,
pub margin_left: Option<f64>,
pub margin_right: Option<f64>,
pub page_ranges: Option<String>,
pub header_template: Option<String>,
pub footer_template: Option<String>,
pub prefer_css_page_size: Option<bool>,
pub transfer_mode: Option<String>,
pub generate_tagged_pdf: Option<bool>,
pub generate_document_outline: Option<bool>,
}Expand description
Parameters for Page.printToPDF.
Fields§
§landscape: Option<bool>Paper orientation (default: false = portrait).
Display header and footer (default: false).
print_background: Option<bool>Print background graphics (default: false).
scale: Option<f64>Scale of the webpage rendering (default: 1).
paper_width: Option<f64>Paper width in inches (default: 8.5).
paper_height: Option<f64>Paper height in inches (default: 11).
margin_top: Option<f64>Top margin in inches (default: 0.4).
margin_bottom: Option<f64>Bottom margin in inches (default: 0.4).
margin_left: Option<f64>Left margin in inches (default: 0.4).
margin_right: Option<f64>Right margin in inches (default: 0.4).
page_ranges: Option<String>Paper ranges to print, e.g., ‘1-5, 8, 11-13’.
header_template: Option<String>HTML template for the print header.
HTML template for the print footer.
prefer_css_page_size: Option<bool>Whether or not to prefer page size as defined by css.
transfer_mode: Option<String>Return as stream (experimental).
generate_tagged_pdf: Option<bool>Whether to generate tagged PDF. Default: true.
generate_document_outline: Option<bool>Whether to generate document outline. Default: false.
Trait Implementations§
Source§impl Clone for PrintToPdfParams
impl Clone for PrintToPdfParams
Source§fn clone(&self) -> PrintToPdfParams
fn clone(&self) -> PrintToPdfParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrintToPdfParams
impl Debug for PrintToPdfParams
Source§impl Default for PrintToPdfParams
impl Default for PrintToPdfParams
Source§fn default() -> PrintToPdfParams
fn default() -> PrintToPdfParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PrintToPdfParams
impl RefUnwindSafe for PrintToPdfParams
impl Send for PrintToPdfParams
impl Sync for PrintToPdfParams
impl Unpin for PrintToPdfParams
impl UnwindSafe for PrintToPdfParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more