#[repr(C)]pub struct _cef_pdf_print_settings_t {Show 18 fields
pub size: usize,
pub landscape: c_int,
pub print_background: c_int,
pub scale: f64,
pub paper_width: f64,
pub paper_height: f64,
pub prefer_css_page_size: c_int,
pub margin_type: cef_pdf_print_margin_type_t,
pub margin_top: f64,
pub margin_right: f64,
pub margin_bottom: f64,
pub margin_left: f64,
pub page_ranges: cef_string_t,
pub display_header_footer: c_int,
pub header_template: cef_string_t,
pub footer_template: cef_string_t,
pub generate_tagged_pdf: c_int,
pub generate_document_outline: c_int,
}Expand description
Structure representing PDF print settings. These values match the parameters supported by the DevTools Page.printToPDF function. See https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
Fields§
§size: usizeSize of this structure.
landscape: c_intSet to true (1) for landscape mode or false (0) for portrait mode.
print_background: c_intSet to true (1) to print background graphics.
scale: f64The percentage to scale the PDF by before printing (e.g. .5 is 50%). If this value is less than or equal to zero the default value of 1.0 will be used.
paper_width: f64Output paper size in inches. If either of these values is less than or equal to zero then the default paper size (letter, 8.5 x 11 inches) will be used.
paper_height: f64§prefer_css_page_size: c_intSet to true (1) to prefer page size as defined by css. Defaults to false (0), in which case the content will be scaled to fit the paper size.
margin_type: cef_pdf_print_margin_type_tMargin type.
margin_top: f64Margins in inches. Only used if |margin_type| is set to PDF_PRINT_MARGIN_CUSTOM.
margin_right: f64§margin_bottom: f64§margin_left: f64§page_ranges: cef_string_tPaper ranges to print, one based, e.g., ‘1-5, 8, 11-13’. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
Set to true (1) to display the header and/or footer. Modify |header_template| and/or |footer_template| to customize the display.
header_template: cef_string_tHTML template for the print header. Only displayed if |display_header_footer| is true (1). Should be valid HTML markup with the 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, “” would generate a span containing the title.
HTML template for the print footer. Only displayed if |display_header_footer| is true (1). Uses the same format as |header_template|.
generate_tagged_pdf: c_intSet to true (1) to generate tagged (accessible) PDF.
generate_document_outline: c_intSet to true (1) to generate a document outline.
Trait Implementations§
Source§impl Clone for _cef_pdf_print_settings_t
impl Clone for _cef_pdf_print_settings_t
Source§fn clone(&self) -> _cef_pdf_print_settings_t
fn clone(&self) -> _cef_pdf_print_settings_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more