從網路印表機列印 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 傳送到預設印表機。
// 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(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 下載 18,560,885 | 版本: 2026.4 剛剛發布

