Impressão de PDFs em impressoras de rede
Como faço para usar o IronPDF para imprimir a partir de uma impressora de rede?
O IronPDF suporta todas as opções de impressão disponíveis em C#.
Enviar para uma impressora padrão:
Use o método Print para enviar o PDF para a impressora padrão.
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
Enviar para uma impressora específica:
Use o método sobrecarregado Print para especificar a impressora pelo nome.
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)
Descubra as impressoras:
Para enviar o documento para uma impressora específica, certifique-se de que a impressora esteja "detectada".
Para AirPrint:
Se você usa o AirPrint, experimente as seguintes sugestões:
- AirPrint: Impressão de um arquivo PDF diretamente na impressora
- Como falsificar uma impressora AirPrint
Você também pode tentar:
PdfDocument.GetPrintDocument() ou sobrecargas PdfDocument.Print, que mostram a janela de pré-visualização de impressão e, se disponível, permitirão que o AirPrint seja selecionado.

