pub struct PdfOptions {
pub paper_width: Option<f64>,
pub paper_height: Option<f64>,
pub print_background: Option<bool>,
pub scale: Option<f64>,
pub display_header_footer: Option<bool>,
pub margin_top: Option<f64>,
pub margin_bottom: Option<f64>,
pub margin_left: Option<f64>,
pub margin_right: Option<f64>,
}Expand description
Options for page PDF generation via CDP Page.printToPDF.
All fields are optional; omitted fields use the browser default.
Use PdfOptions::letter for a US Letter preset with background printing.
Fields§
§paper_width: Option<f64>Paper width in inches.
paper_height: Option<f64>Paper height in inches.
print_background: Option<bool>Whether to print background graphics.
scale: Option<f64>Scale factor (1.0 = 100%).
Whether to display header and footer.
margin_top: Option<f64>Top margin in inches.
margin_bottom: Option<f64>Bottom margin in inches.
margin_left: Option<f64>Left margin in inches.
margin_right: Option<f64>Right margin in inches.
Implementations§
Source§impl PdfOptions
impl PdfOptions
Trait Implementations§
Source§impl Clone for PdfOptions
impl Clone for PdfOptions
Source§fn clone(&self) -> PdfOptions
fn clone(&self) -> PdfOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PdfOptions
impl Debug for PdfOptions
Source§impl Default for PdfOptions
impl Default for PdfOptions
Source§fn default() -> PdfOptions
fn default() -> PdfOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PdfOptions
impl<'de> Deserialize<'de> for PdfOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PdfOptions
impl RefUnwindSafe for PdfOptions
impl Send for PdfOptions
impl Sync for PdfOptions
impl Unpin for PdfOptions
impl UnsafeUnpin for PdfOptions
impl UnwindSafe for PdfOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more