Esatto.VirtualPrinter.Common 4.2.0

dotnet add package Esatto.VirtualPrinter.Common --version 4.2.0
                    
NuGet\Install-Package Esatto.VirtualPrinter.Common -Version 4.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Esatto.VirtualPrinter.Common" Version="4.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Esatto.VirtualPrinter.Common" Version="4.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Esatto.VirtualPrinter.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Esatto.VirtualPrinter.Common --version 4.2.0
                    
#r "nuget: Esatto.VirtualPrinter.Common, 4.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Esatto.VirtualPrinter.Common@4.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Esatto.VirtualPrinter.Common&version=4.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Esatto.VirtualPrinter.Common&version=4.2.0
                    
Install as a Cake Tool

Esatto.VirtualPrinter.Common

Client library for working with the Esatto Virtual Printer driver.

SpoolFile

The SpoolFile class reads print job files generated by the virtual printer. It extends Stream and provides access to the XPS document content along with job metadata.

await using var spoolFile = await SpoolFile.OpenAsync(jobFilePath);

Console.WriteLine($"Document: {spoolFile.DocumentName}");
Console.WriteLine($"Printer: {spoolFile.PrinterName}");
Console.WriteLine($"DataType: {spoolFile.DataType}");

// spoolFile is a Stream containing the XPS document
// Use it directly or copy to another stream

VirtualPrinterSystemConfiguration

The VirtualPrinterSystemConfiguration class manages virtual printer installations on the system. Requires the Esatto Virtual Printer driver to be installed.

// Enumerate existing printers (read-only)
using var config = new VirtualPrinterSystemConfiguration(PrintSystemDesiredAccess.EnumerateServer);
foreach (var printer in config.Printers)
{
    Console.WriteLine($"{printer.Name} -> {printer.TargetExe} {printer.TargetArgs}");
}

// Add a new virtual printer (requires elevation)
using var adminConfig = new VirtualPrinterSystemConfiguration(PrintSystemDesiredAccess.AdministrateServer);
adminConfig.Printers.Add(
    queueName: "My Virtual Printer",
    exePath: @"C:\MyApp\PrintHandler.exe",
    args: "--process"
);

More Information

For driver installation, MSI examples, and full documentation, see the main repository:
https://github.com/mgaffigan/Esatto.VirtualPrinter

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • net10.0-windows7.0

    • No dependencies.
  • net8.0-windows7.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.

Version Downloads Last Updated
4.2.0 180 6/2/2026
4.1.0 173 2/14/2026