Spire.Printing 11.1.0

dotnet add package Spire.Printing --version 11.1.0
                    
NuGet\Install-Package Spire.Printing -Version 11.1.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="Spire.Printing" Version="11.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Spire.Printing" Version="11.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Spire.Printing" />
                    
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 Spire.Printing --version 11.1.0
                    
#r "nuget: Spire.Printing, 11.1.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 Spire.Printing@11.1.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=Spire.Printing&version=11.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Spire.Printing&version=11.1.0
                    
Install as a Cake Tool

Spire.Printing: Powerful Cross-Platform Printing Library for .NET Developers

Product PageDocumentationExamplesForumTemporary LicenseCustomized Demo

Spire.Printing is a robust, standalone printing library designed specifically for .NET developers to seamlessly integrate professional printing capabilities into their applications. As a completely independent tool, it runs without any external dependencies in .NET environments, eliminating the need for cumbersome third-party components. It natively supports cross-platform document printing for the latest .NET frameworks including .NET 6.0, .NET 9.0, and .NET 10.0, ensuring compatibility across diverse development scenarios.

Spire.Printing enables silent printing and flexible custom print settings—all without relying on Office Interop, helping developers avoid the limitations and compatibility issues associated with Office-related dependencies.

Full .NET Support:

  • Compatible with .NET5.0, .NET 6.0, .NET 9.0, and .NET 10.0 frameworks.

OS & Processors:

  • Windows (x64, x86)
  • Linux (x64, ARM)
  • Mac (x64, ARM)

Get All Printer Information

  • Printer Names
  • Retrieve Printer Names

Apply Custom Print Settings

  • Adjust Paper Settings
  • Set Paper Size
  • Set Paper Portrait Orientation
  • Set the Number of Copies
  • Set the Print Range
  • Specify the Printer Name
  • Print collated
  • Print uncollated
  • Print on Both Sides
  • Print in Grayscale
  • Print to specified file name
  • On Windows, Print the .xps file format,
  • On Linux & Mac, Print .pdf file format

Control the Printing Process

  • Silent Printing
  • Record printing logs

Note: The trial version only supports printing the first 10 pages of the PDF. After you apply a license, the page limits will be lifted.

Method to remove the page limitations:

Spire.Doc.License.LicenseProvider.SetLicenseKey(string key); 
Spire.Xls.License.LicenseProvider.SetLicenseKey(string key); 
Spire.Pdf.License.LicenseProvider.SetLicenseKey(string key);
Spire.Presentation.License.LicenseProvider.SetLicenseKey(string key);

Use PrintDocument class to print the document directly.

using Spire.Printing;

IPrintDocumentStream documentStream;
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
{
    // Windows
    documentStream = new XpsPrintDocument("test.xps");
}
else
{
    // Non-Windows
    documentStream = new PdfPrintDocument("test.pdf");
}
PrintDocument printDocument = new PrintDocument(documentStream);
printDocument.PrintSettings.PaperSize = PaperSize.A4;
//Check if duplex printing is supported
if (printDocument.PrintSettings.CanDuplex)
{
    //Print in duplex
    printDocument.PrintSettings.Duplex = Duplex.Vertical;
}
printDocument.PrintSettings.SelectPageRange(2, 5);
// Print to file
printDocument.PrintSettings.PrintToFile("toXps.xps");
printDocument.Print();

Implement cross-platform printing with Spire.PDF

using Spire.Pdf;
using Spire.Printing;

//Check the system
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
using (PdfDocument pdfDocument = new PdfDocument())
{
    //Use Spire.PDF to save documents as. xps or. pdf document streams 
    pdfDocument.LoadFromFile("test.pdf");
    Spire.Pdf.FileFormat fileFormat = !isWindows ? Spire.Pdf.FileFormat.PDF : Spire.Pdf.FileFormat.XPS;
    MemoryStream stream = new MemoryStream();
    pdfDocument.SaveToStream(stream, fileFormat);

    //Convert to IPrintDocumentStream according to the system
    IPrintDocumentStream pdfStream = !isWindows ? new PdfPrintDocument(stream) : new XpsPrintDocument(stream);

    //Print
    PrintDocument printPdf = new PrintDocument(pdfStream);
    printPdf.PrintSettings.SelectPageRange(1, 1);
    printPdf.Print();

    //Dispose
    printPdf.Dispose();
}

Implement cross-platform printing with Spire.Presentation

using Spire.Presentation;
using Spire.Printing;

//Check the system
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
using (Presentation ppt = new Presentation())
{
    //Use Spire.Presentation to save documents as. xps or. pdf document streams 
    ppt.LoadFromFile("test.pptx");
    Spire.Presentation.FileFormat fileFormat = !isWindows ? Spire.Presentation.FileFormat.PDF : Spire.Presentation.FileFormat.XPS;
    MemoryStream stream = new MemoryStream();
    ppt.SaveToFile(stream, fileFormat);

    //Convert to IPrintDocumentStream according to the system
    IPrintDocumentStream pptStream = !isWindows ? new PdfPrintDocument(stream) : new XpsPrintDocument(stream);

    //Print
    PrintDocument printPpt = new PrintDocument(pptStream);
    printPpt.PrintSettings.SelectPageRange(1, 1);
    printPpt.Print();

    //Dispose
    printPpt.Dispose();
}

Implement cross-platform printing with Spire.XLS

using Spire.Printing;
using Spire.Xls;

//Check the system
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
using (Workbook wb = new Workbook())
{
    //Use Spire.Xls to save documents as. xps or. pdf document streams 
    wb.LoadFromFile("test.xlsx");
    Spire.Xls.FileFormat fileFormat = !isWindows ? Spire.Xls.FileFormat.PDF : Spire.Xls.FileFormat.XPS;
    MemoryStream stream = new MemoryStream();
    wb.SaveToStream(stream, fileFormat);

    //Convert to IPrintDocumentStream according to the system
    IPrintDocumentStream xlsStream = !isWindows ? new PdfPrintDocument(stream) : new XpsPrintDocument(stream);

    //Print
    PrintDocument printxls = new PrintDocument(xlsStream);
    printxls.PrintSettings.SelectPageRange(1, 1);
    printxls.Print();

    //Dispose
    printxls.Dispose();
}

Implement cross-platform printing with Spire.Doc

using Spire.Doc;
using Spire.Printing;

//Check the system
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);

using (Document document = new Document())
{
    //Use Spire.Doc to save documents as. xps or. pdf document streams 
    document.LoadFromFile(@"test.docx");
    Spire.Doc.FileFormat fileFormat = !isWindows ? Spire.Doc.FileFormat.PDF : Spire.Doc.FileFormat.XPS;
    MemoryStream stream = new MemoryStream();
    document.SaveToStream(stream, fileFormat);

    //Convert to IPrintDocumentStream according to the system
    IPrintDocumentStream docStream = !isWindows ? new PdfPrintDocument(stream) : new XpsPrintDocument(stream);

    //Print
    PrintDocument printDoc = new PrintDocument(docStream);
    printDoc.PrintSettings.SelectPageRange(1, 1);
    printDoc.Print();

    //Dispose
    printDoc.Dispose();
}

Product PageDocumentationExamplesForumTemporary LicenseCustomized Demo

Product 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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
11.1.0 78 1/13/2026
1.1.1 91 1/6/2026