SumatraPDFPrinter 1.0.5
See the version list below for details.
dotnet add package SumatraPDFPrinter --version 1.0.5
NuGet\Install-Package SumatraPDFPrinter -Version 1.0.5
<PackageReference Include="SumatraPDFPrinter" Version="1.0.5" />
<PackageVersion Include="SumatraPDFPrinter" Version="1.0.5" />
<PackageReference Include="SumatraPDFPrinter" />
paket add SumatraPDFPrinter --version 1.0.5
#r "nuget: SumatraPDFPrinter, 1.0.5"
#:package SumatraPDFPrinter@1.0.5
#addin nuget:?package=SumatraPDFPrinter&version=1.0.5
#tool nuget:?package=SumatraPDFPrinter&version=1.0.5
SumatraPDFPrinter
SumatraPDFPrinter is a lightweight C# library that allows you to print PDF files using SumatraPDF, a fast and minimalistic PDF viewer. This library provides an easy way to send PDF documents to a specified printer without user interaction.
📌 Features
- Print PDF files programmatically.
- Supports specifying the target printer.
- Uses SumatraPDF's command-line options for fast and silent printing.
- Simple and lightweight, with minimal dependencies.
- SumatraPDF is included with this library, so no separate download is required.
🛠 Installation
Add PdfPrinter.cs
to your project.
🚀 Usage
using SumatraPDFPrinter;
string pdfPath = "C:\\path\\to\\yourfile.pdf";
string printerName = "Your Printer Name";
PdfPrinter.PrintPdf(pdfPath, printerName);
For asynchronous printing, use:
await Task.Run(() => PdfPrinter.PrintPdf(pdfPath, printerName));
⚙️ Configuration
Make sure that:
- The provided PDF file path is valid.
- The specified printer name is correct.
🛑 Troubleshooting
- "PDF file not found!" → Verify the file path before printing.
- Printing is stuck → Use
Task.Run
to avoid blocking the request.
📜 License
This library is licensed under the MIT License. Feel free to modify and use it in your projects.
💡 Contributions are welcome! If you find a bug or have an improvement, feel free to submit a pull request or open an issue.
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 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. |
-
net6.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.