Partager via


CoreWebView2PrintSettings.PrinterName Property

Definition

The name of the printer to use.

public string PrinterName { get; set; }
member this.PrinterName : string with get, set
Public Property PrinterName As String

Property Value

Remarks

Defaults to empty string. If the printer name is empty string or null, then it prints to the default printer on the user OS.

If provided printer name doesn't match with the name of any installed printers on the user OS, the method returns with @CoreWebView2PrintStatus$.PrinterUnavailable.

Use DeviceInformation.FindAllAsync to get the list of local printers with AQS as "System.Devices.HardwareIds:~~"PRINTENUM\LocalPrintQueue""

This value is ignored in PrintToPdfStreamAsync(CoreWebView2PrintSettings) method.

Applies to