透過網路印表機列印 PDF 檔案
This article was translated from English: Does it need improvement?
Translated
View 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 下載 19,014,616 | 版本: 2026.5 just released

