Alexey Titov
Alexey Titov

Reputation: 353

Get printer's default page orientation

I have a C# .NET 8.0 console application, intended to run on Windows 10. How can I get installed printer's (let's say "Microsoft Print to PDF") default page orientation?^

Upvotes: 0

Views: 49

Answers (1)

Luuk
Luuk

Reputation: 14958

(source: https://powershell.one/wmi/root/cimv2/win32_printerconfiguration#orientation )

Get-CimInstance -ClassName Win32_PrinterConfiguration | Select-Object -Property Name, Orientation

Values for orientation (found after a short test):

  • 1 = Portrait
  • 2 = Landscape

Upvotes: 2

Related Questions