從網路印表機列印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.Print重載,這些會顯示列印預覽窗口,如果可用,將允許選擇AirPrint。
準備開始了嗎?
Nuget 下載 20,296,129 | 版本: 2026.7 剛剛發布

