namespace ElectronNET.API.Entities { /// /// Print dpi /// /// Up-to-date with Electron API 39.2 public class PrintDpi { /// /// Gets or sets the horizontal DPI. /// public float Horizontal { get; set; } /// /// Gets or sets the vertical DPI. /// public float Vertical { get; set; } } /// /// The page range to print /// /// Up-to-date with Electron API 39.2 public class PrintPageRange { /// /// Gets or sets the starting page index (0-based). /// public int From { get; set; } /// /// Gets or sets the ending page index (inclusive, 0-based). /// public int To { get; set; } } /// /// Print options /// /// Up-to-date with Electron API 39.2 public class PrintOptions { /// /// Gets or sets a value indicating whether to suppress print settings prompts. /// public bool Silent { get; set; } /// /// Gets or sets a value indicating whether to print background graphics. /// public bool PrintBackground { get; set; } /// /// Gets or sets the printer device name to use. /// public string DeviceName { get; set; } /// /// Gets or sets a value indicating whether the page will be printed in color. /// public bool Color { get; set; } /// /// Gets or sets the margins for the print job. Use MarginType plus top/bottom/left/right for custom. /// Units for margins with webContents.print are pixels (per MCP); for webContents.printToPDF, inches. /// public Margins Margins { get; set; } /// /// Gets or sets a value indicating whether to print in landscape orientation. /// public bool Landscape { get; set; } /// /// Gets or sets the scale factor of the web page. /// public float ScaleFactor { get; set; } /// /// Gets or sets the number of pages to print per sheet. /// public int PagesPerSheet { get; set; } /// /// Gets or sets the number of copies to print. /// public int Copies { get; set; } /// /// Gets or sets a value indicating whether pages should be collated. /// public bool Collate { get; set; } /// /// Gets or sets the page range(s) to print. On macOS, only one range is honored. /// public PrintPageRange[] PageRanges { get; set; } /// /// Gets or sets the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge. /// public string DuplexMode { get; set; } /// /// Gets or sets the DPI settings for the print job. /// public PrintDpi Dpi { get; set; } /// /// Gets or sets the string to be printed as page header. /// public string Header { get; set; } /// /// Gets or sets the string to be printed as page footer. /// public string Footer { get; set; } /// /// Gets or sets the page size of the printed document. Can be A0–A6, Legal, Letter, Tabloid, /// or an object. For webContents.print, custom sizes use microns (Chromium validates width_microns/height_microns). /// public PageSize PageSize { get; set; } } }