Struct cdp::page::PrintToPdfCommand
[−]
[src]
pub struct PrintToPdfCommand<'a> { 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<Cow<'a, str>>, pub ignore_invalid_page_ranges: Option<bool>, }
[Experimental] Print page as PDF.
Command Page.printToPDF
Domain Module: cdp::page
Command Struct: cdp::page::PrintToPdfCommand
Response Struct: cdp::page::PrintToPdfResponse
Fields
landscape: Option<bool>
Paper orientation. Defaults to false.
Display header and footer. Defaults to false.
print_background: Option<bool>
Print background graphics. Defaults to false.
scale: Option<f64>
Scale of the webpage rendering. Defaults to 1.
paper_width: Option<f64>
Paper width in inches. Defaults to 8.5 inches.
paper_height: Option<f64>
Paper height in inches. Defaults to 11 inches.
margin_top: Option<f64>
Top margin in inches. Defaults to 1cm (~0.4 inches).
margin_bottom: Option<f64>
Bottom margin in inches. Defaults to 1cm (~0.4 inches).
margin_left: Option<f64>
Left margin in inches. Defaults to 1cm (~0.4 inches).
margin_right: Option<f64>
Right margin in inches. Defaults to 1cm (~0.4 inches).
page_ranges: Option<Cow<'a, str>>
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
ignore_invalid_page_ranges: Option<bool>
Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
Trait Implementations
impl<'a> Clone for PrintToPdfCommand<'a>
[src]
fn clone(&self) -> PrintToPdfCommand<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for PrintToPdfCommand<'a>
[src]
impl<'a> PartialEq for PrintToPdfCommand<'a>
[src]
fn eq(&self, __arg_0: &PrintToPdfCommand<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PrintToPdfCommand<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> CdpCommand for PrintToPdfCommand<'a>
[src]
const COMMAND_NAME: &'static str
COMMAND_NAME: &'static str = "Page.printToPDF"
impl<'a> SerializeCdpCommand for PrintToPdfCommand<'a>
[src]
fn command_name(&self) -> &str
[src]
fn serialize_command_params<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
impl<'de, 'a> DeserializeCdpCommand<'de> for PrintToPdfCommand<'a>
[src]
fn deserialize_command<D>(
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,
[src]
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,