從網路印表機列印PDF文件
Curtis Chau
Updated: 2026年4月22日
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
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發送到指定名稱的印表機:
使用重載的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
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)發現印表機:
要將文件發送至特定印表機,請確保該印表機已被'發現'。
關於AirPrint:
如果使用AirPrint,請嘗試以下建議:
您也可以嘗試:
PdfDocument.Print重載,這些會顯示列印預覽窗口,如果可用,將允許選擇AirPrint。

技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多