Class PrintCommandParameters
- Namespace
- WebDriverBiDi.BrowsingContext
- Assembly
- WebDriverBiDi.dll
Provides parameters for the browsingContext.print command.
public class PrintCommandParameters : CommandParameters<PrintCommandResult>
- Inheritance
-
PrintCommandParameters
- Inherited Members
Constructors
PrintCommandParameters(string)
Initializes a new instance of the PrintCommandParameters class.
public PrintCommandParameters(string browsingContextId)
Parameters
browsingContextIdstringThe ID of the browsing context to print.
Properties
Background
Gets or sets a value indicating whether to print background images. Defaults to false.
[JsonPropertyName("background")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Background { get; set; }
Property Value
- bool?
BrowsingContextId
Gets or sets the ID of the browsing context to print.
[JsonPropertyName("context")]
public string BrowsingContextId { get; set; }
Property Value
Margins
Gets or sets a value containing the margins for the printed page.
[JsonPropertyName("margin")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrintMarginParameters? Margins { get; set; }
Property Value
MethodName
Gets the method name of the command.
[JsonIgnore]
public override string MethodName { get; }
Property Value
Orientation
Gets or sets the orientation of the printed page. If omitted, defaults to Portrait.
[JsonPropertyName("orientation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrintOrientation? Orientation { get; set; }
Property Value
Page
Gets or sets a value containing information about the size of the printed page.
[JsonPropertyName("page")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PrintPageParameters? Page { get; set; }
Property Value
PageRanges
Gets the list of page ranges to print in the resulting output. Each entry is a PageRange representing a single page or an inclusive range of pages.
[JsonIgnore]
public List<PageRange> PageRanges { get; }
Property Value
Remarks
When the list is empty, the property is omitted from the JSON payload entirely; an empty array is never sent. Add entries to restrict the output to specific pages.
Scale
Gets or sets the scale factor of the printed page. If omitted, defaults to 1.0.
[JsonPropertyName("scale")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[SpecRange(0.1, 2)]
[JsonConverter(typeof(FixedDoubleJsonConverter))]
public double? Scale { get; set; }
Property Value
Remarks
Valid values for this property range from 0.1 to 2.0, inclusive. This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.
ShrinkToFit
Gets or sets a value indicating whether to shrink the content to fit the width of the page. If omitted, defaults to true.
[JsonPropertyName("shrinkToFit")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? ShrinkToFit { get; set; }
Property Value
- bool?