-
-
Notifications
You must be signed in to change notification settings - Fork 747
Expand file tree
/
Copy pathMargins.cs
More file actions
42 lines (37 loc) · 1.41 KB
/
Margins.cs
File metadata and controls
42 lines (37 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace ElectronNET.API.Entities;
/// <summary>
/// Margins object used by webContents.print options and webContents.printToPDF.
/// </summary>
/// <remarks>Up-to-date with Electron API 39.2</remarks>
public class Margins
{
/// <summary>
/// Gets or sets the margin type. Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
/// you will also need to specify `top`, `bottom`, `left`, and `right`.
/// </summary>
public string MarginType { get; set; }
/// <summary>
/// Gets or sets the top margin of the printed web page. Units depend on API:
/// - webContents.print: pixels
/// - webContents.printToPDF: inches
/// </summary>
public double Top { get; set; }
/// <summary>
/// Gets or sets the bottom margin of the printed web page. Units depend on API:
/// - webContents.print: pixels
/// - webContents.printToPDF: inches
/// </summary>
public double Bottom { get; set; }
/// <summary>
/// Gets or sets the left margin of the printed web page. Units depend on API:
/// - webContents.print: pixels
/// - webContents.printToPDF: inches
/// </summary>
public double Left { get; set; }
/// <summary>
/// Gets or sets the right margin of the printed web page. Units depend on API:
/// - webContents.print: pixels
/// - webContents.printToPDF: inches
/// </summary>
public double Right { get; set; }
}