pub struct Settings {Show 28 fields
pub orientation: Option<Orientation>,
pub paper_format: Option<String>,
pub paper_width: Option<String>,
pub paper_height: Option<String>,
pub n_copies: Option<String>,
pub default_source: Option<String>,
pub quality: Option<Quality>,
pub resolution: Option<String>,
pub use_color: Option<bool>,
pub duplex: Option<String>,
pub collate: Option<String>,
pub reverse: Option<String>,
pub media_type: Option<String>,
pub dither: Option<String>,
pub scale: Option<String>,
pub print_pages: Option<String>,
pub page_ranges: Option<String>,
pub page_set: Option<String>,
pub finishings: Option<String>,
pub number_up: Option<String>,
pub number_up_layout: Option<String>,
pub output_bin: Option<String>,
pub resolution_x: Option<String>,
pub resolution_y: Option<String>,
pub print_lpi: Option<String>,
pub output_basename: Option<String>,
pub output_file_format: Option<String>,
pub output_uri: Option<Url>,
}
Expand description
Print settings to set in the print dialog.
Fields§
§orientation: Option<Orientation>
One of landscape, portrait, reverse_landscape or reverse_portrait.
paper_format: Option<String>
A paper name according to PWG 5101.1-2002
paper_width: Option<String>
Paper width, in millimeters.
paper_height: Option<String>
Paper height, in millimeters.
n_copies: Option<String>
The number of copies to print.
default_source: Option<String>
The default paper source.
quality: Option<Quality>
Print quality.
resolution: Option<String>
The resolution, sets both resolution-x & resolution-y
use_color: Option<bool>
Whether to use color.
duplex: Option<String>
Duplex printing mode, one of simplex, horizontal or vertical.
collate: Option<String>
Whether to collate copies.
reverse: Option<String>
Whether to reverse the order of printed pages.
media_type: Option<String>
A media type according to PWG 5101.1-2002
dither: Option<String>
The dithering to use, one of fine, none, coarse, lineart, grayscale or error-diffusion.
scale: Option<String>
The scale in percent
print_pages: Option<String>
What pages to print, one of all, selection, current or ranges.
page_ranges: Option<String>
A list of page ranges, formatted like this: 0-2,4,9-11.
page_set: Option<String>
What pages to print, one of all, even or odd.
finishings: Option<String>
The finishings.
number_up: Option<String>
The number of pages per sheet.
number_up_layout: Option<String>
One of lrtb, lrbt, rltb, rlbt, tblr, tbrl, btlr, btrl.
output_bin: Option<String>
The output bin.
resolution_x: Option<String>
The horizontal resolution in dpi.
resolution_y: Option<String>
The vertical resolution in dpi.
print_lpi: Option<String>
The resolution in lpi (lines per inch).
output_basename: Option<String>
Basename to use for print-to-file.
output_file_format: Option<String>
Format to use for print-to-file, one of PDF, PS, SVG
output_uri: Option<Url>
The uri used for print-to file.
Implementations§
source§impl Settings
impl Settings
sourcepub fn orientation(self, orientation: impl Into<Option<Orientation>>) -> Self
pub fn orientation(self, orientation: impl Into<Option<Orientation>>) -> Self
Sets the orientation.
sourcepub fn paper_format<'a>(self, paper_format: impl Into<Option<&'a str>>) -> Self
pub fn paper_format<'a>(self, paper_format: impl Into<Option<&'a str>>) -> Self
Sets the paper name.
sourcepub fn paper_width<'a>(self, paper_width: impl Into<Option<&'a str>>) -> Self
pub fn paper_width<'a>(self, paper_width: impl Into<Option<&'a str>>) -> Self
Sets the paper width.
sourcepub fn paper_height<'a>(self, paper_height: impl Into<Option<&'a str>>) -> Self
pub fn paper_height<'a>(self, paper_height: impl Into<Option<&'a str>>) -> Self
Sets the paper height.
sourcepub fn n_copies<'a>(self, n_copies: impl Into<Option<&'a str>>) -> Self
pub fn n_copies<'a>(self, n_copies: impl Into<Option<&'a str>>) -> Self
Sets the number of copies to print.
sourcepub fn default_source<'a>(
self,
default_source: impl Into<Option<&'a str>>,
) -> Self
pub fn default_source<'a>( self, default_source: impl Into<Option<&'a str>>, ) -> Self
Sets the default paper source.
sourcepub fn resolution<'a>(self, resolution: impl Into<Option<&'a str>>) -> Self
pub fn resolution<'a>(self, resolution: impl Into<Option<&'a str>>) -> Self
Sets the resolution, both resolution-x & resolution-y.
sourcepub fn duplex<'a>(self, duplex: impl Into<Option<&'a str>>) -> Self
pub fn duplex<'a>(self, duplex: impl Into<Option<&'a str>>) -> Self
Sets the duplex printing mode.
sourcepub fn collate<'a>(self, collate: impl Into<Option<&'a str>>) -> Self
pub fn collate<'a>(self, collate: impl Into<Option<&'a str>>) -> Self
Whether to collate copies.
sourcepub fn reverse<'a>(self, reverse: impl Into<Option<&'a str>>) -> Self
pub fn reverse<'a>(self, reverse: impl Into<Option<&'a str>>) -> Self
Sets whether to reverse the order of the printed pages.
sourcepub fn media_type<'a>(self, media_type: impl Into<Option<&'a str>>) -> Self
pub fn media_type<'a>(self, media_type: impl Into<Option<&'a str>>) -> Self
Sets the media type.
sourcepub fn scale<'a>(self, scale: impl Into<Option<&'a str>>) -> Self
pub fn scale<'a>(self, scale: impl Into<Option<&'a str>>) -> Self
Sets the page scale in percent.
sourcepub fn print_pages<'a>(self, print_pages: impl Into<Option<&'a str>>) -> Self
pub fn print_pages<'a>(self, print_pages: impl Into<Option<&'a str>>) -> Self
Sets what pages to print, one of all, selection, current or ranges.
sourcepub fn page_ranges<'a>(self, page_ranges: impl Into<Option<&'a str>>) -> Self
pub fn page_ranges<'a>(self, page_ranges: impl Into<Option<&'a str>>) -> Self
Sets a list of page ranges, formatted like this: 0-2,4,9-11.
sourcepub fn page_set<'a>(self, page_set: impl Into<Option<&'a str>>) -> Self
pub fn page_set<'a>(self, page_set: impl Into<Option<&'a str>>) -> Self
Sets what pages to print, one of all, even or odd.
sourcepub fn finishings<'a>(self, finishings: impl Into<Option<&'a str>>) -> Self
pub fn finishings<'a>(self, finishings: impl Into<Option<&'a str>>) -> Self
Sets the finishings.
sourcepub fn number_up<'a>(self, number_up: impl Into<Option<&'a str>>) -> Self
pub fn number_up<'a>(self, number_up: impl Into<Option<&'a str>>) -> Self
Sets the number of pages per sheet.
sourcepub fn number_up_layout<'a>(
self,
number_up_layout: impl Into<Option<&'a str>>,
) -> Self
pub fn number_up_layout<'a>( self, number_up_layout: impl Into<Option<&'a str>>, ) -> Self
Sets the number up layout, one of lrtb, lrbt, rltb, rlbt, tblr, tbrl, btlr, btrl.
sourcepub fn output_bin<'a>(self, output_bin: impl Into<Option<&'a str>>) -> Self
pub fn output_bin<'a>(self, output_bin: impl Into<Option<&'a str>>) -> Self
Sets the output bin
sourcepub fn resolution_x<'a>(self, resolution_x: impl Into<Option<&'a str>>) -> Self
pub fn resolution_x<'a>(self, resolution_x: impl Into<Option<&'a str>>) -> Self
Sets the horizontal resolution in dpi.
sourcepub fn resolution_y<'a>(self, resolution_y: impl Into<Option<&'a str>>) -> Self
pub fn resolution_y<'a>(self, resolution_y: impl Into<Option<&'a str>>) -> Self
Sets the vertical resolution in dpi.
sourcepub fn print_lpi<'a>(self, print_lpi: impl Into<Option<&'a str>>) -> Self
pub fn print_lpi<'a>(self, print_lpi: impl Into<Option<&'a str>>) -> Self
Sets the resolution in lines per inch.
sourcepub fn output_basename<'a>(
self,
output_basename: impl Into<Option<&'a str>>,
) -> Self
pub fn output_basename<'a>( self, output_basename: impl Into<Option<&'a str>>, ) -> Self
Sets the print-to-file base name.
sourcepub fn output_file_format<'a>(
self,
output_file_format: impl Into<Option<&'a str>>,
) -> Self
pub fn output_file_format<'a>( self, output_file_format: impl Into<Option<&'a str>>, ) -> Self
Sets the print-to-file format, one of PS, PDF, SVG.
sourcepub fn output_uri<'a>(self, output_uri: impl Into<Option<&'a Url>>) -> Self
pub fn output_uri<'a>(self, output_uri: impl Into<Option<&'a Url>>) -> Self
Sets the print-to-file output uri.