从网络打印机打印 PDF.
This article was translated from English: Does it need improvement?
TranslatedView the article in English
IronPrint 是 Iron Software 的全新 .NET 打印库,提供跨多种平台的兼容性,包括 Windows、macOS、Android 和 iOS。现在就开始使用 IronPrint!
如何使用 IronPDF 从网络打印机打印?
IronPDF 支持 C# 可用的所有打印选项。
发送到默认打印机:
使用 Print 方法将 PDF 发送到默认打印机。
IronPDF.PdfDocument.Print(System.Boolean)
// C# example of sending a PDF document to the default printer
using IronPdf;
var pdf = PdfDocument.FromFile("example.pdf");
// Sends the document to the default printer
pdf.Print(showPreview: false); // set `showPreview` to true to see a preview before printing// C# example of sending a PDF document to the default printer
using IronPdf;
var pdf = PdfDocument.FromFile("example.pdf");
// Sends the document to the default printer
pdf.Print(showPreview: false); // set `showPreview` to true to see a preview before printing' C# example of sending a PDF document to the default printer
Imports IronPdf
Private pdf = PdfDocument.FromFile("example.pdf")
' Sends the document to the default printer
pdf.Print(showPreview:= False) ' set `showPreview` to true to see a preview before printing$vbLabelText $csharpLabel
发送到指定名称的打印机:
使用重载的 Print 方法通过名称指定打印机。
IronPDF.PdfDocument.Print(System.String, System.Boolean)
// C# example of sending a PDF document to a specific printer by name
using IronPdf;
var pdf = PdfDocument.FromFile("example.pdf");
string printerName = "MyNetworkPrinter";
// Sends the document to the specified printer
pdf.Print(printerName, showPreview: false);// C# example of sending a PDF document to a specific printer by name
using IronPdf;
var pdf = PdfDocument.FromFile("example.pdf");
string printerName = "MyNetworkPrinter";
// Sends the document to the specified printer
pdf.Print(printerName, showPreview: false);' C# example of sending a PDF document to a specific printer by name
Imports IronPdf
Private pdf = PdfDocument.FromFile("example.pdf")
Private printerName As String = "MyNetworkPrinter"
' Sends the document to the specified printer
pdf.Print(printerName, showPreview:= False)$vbLabelText $csharpLabel
发现打印机:
要将文档发送到特定的打印机,请确保该打印机已被"发现"。
对于 AirPrint:
如果使用 AirPrint,请尝试以下建议:
您也可以尝试: PdfDocument.GetPrintDocument() 或 PdfDocument.Print 重载,它们显示打印预览窗口,并且如果有可用的,将允许选择 AirPrint。
准备开始了吗?
Nuget 下载 16,685,821 | 版本: 2025.12 刚刚发布






