PrinterSetting 2.3.1
dotnet add package PrinterSetting --version 2.3.1
NuGet\Install-Package PrinterSetting -Version 2.3.1
<PackageReference Include="PrinterSetting" Version="2.3.1" />
paket add PrinterSetting --version 2.3.1
#r "nuget: PrinterSetting, 2.3.1"
// Install PrinterSetting as a Cake Addin #addin nuget:?package=PrinterSetting&version=2.3.1 // Install PrinterSetting as a Cake Tool #tool nuget:?package=PrinterSetting&version=2.3.1
PrinterSetting
This is a library for changing the output size and orientation of printer.
Ver2.3.1.0 -Added .NET8 to the target framework.
Ver2.3.0.0
-Removed dependencies on System.Drawing.Common and System.Management. And Extensions methods now use Win32API.
Ver2.2.1.0
-Removed .net5.0 from target framework
-Referenced packages changed and reorganized
Ver2.2.0.0
-Changed target framework from 4.7 to 4.7.2
-Referenced packages changed and reorganized
Ver2.1.0.0
-Changed Win32API from ANSI to UNICODE.
-Added Extension for enumerating printers and setting/getting default printers.
Install
PM> Install-Package PrinterSetting
Getting Started
using PrinterSetting;
var printer = new Printer("PrinterName");
printer.SetPageInfo(PageOrientation.Portrait, PaperSize.A5);
foreach (var p in Extensions.EnumeratePrinterName())
{
Console.WriteLine(p);
}
Console.WriteLine(Extensions.GetDefaultPrinterName());
var result = Extensions.SetDefaultPrinter("PrinterName");
Console.WriteLine(Extensions.GetDefaultPrinterName());
.NET5 Or Greater
[assembly: SupportedOSPlatform("windows")] //Put it above the namespace.
or
[SupportedOSPlatform("windows")] //Put it above the class or method.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net472 is compatible. net48 is compatible. net481 was computed. |
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.