Drukowanie plików PDF z drukarek sieciowych
Jak używać IronPDF do drukowania na drukarce sieciowej?
IronPDF obsługuje wszystkie opcje drukowania dostępne w języku C#.
Wyślij do domyślnej drukarki:
Użyj metody Print, aby wysłać PDF do domyślnej drukarki.
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
Wyślij do określonej drukarki:
Użyj przeciążonej metody Print, aby określić drukarkę według nazwy.
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)
Odkryj drukarki:
Aby wysłać dokument do konkretnej drukarki, upewnij się, że została ona "wykryta".
W przypadku AirPrint:
W przypadku korzystania z AirPrint wypróbuj następujące sugestie:
Możesz również spróbować:
Przeciążenia PdfDocument.GetPrintDocument() lub PdfDocument.Print, które pokazują okno podglądu wydruku i, jeśli dostępne, pozwolą na wybranie AirPrint.

