Impression papier de PDF
using IronPdf;

// Create a new PDF and print it
var renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");

// Send the PDF to the default printer to print
// 300 DPI, no user dialog this time ... many overloads to this method
pdf.Print(300);

//For advanced printing we can also use PdfDocument.GetPrintDocument
//Remember to add an assembly reference to System.Drawing.dll or System.Drawing.Common via NuGet.

System.Drawing.Printing.PrintDocument printDocYouCanWorkWith = pdf.GetPrintDocument();
NuGet Download
PM > Install-Package IronPdf
Impression papier de PDF

Impression papier de PDF

Le snippet de code ci-dessus démontre comment imprimer un document PDF en utilisant la bibliothèque IronPdf en .NET. Il inclut des options pour imprimer avec la boîte de dialogue d'impression par défaut de Windows ou silencieusement, et montre comment utiliser l'objet natif PrintDocument pour des configurations d'impression plus avancées. Assurez-vous d'inclure une référence à System.Drawing.dll si vous utilisez l'objet PrintDocument pour des paramètres personnalisés.

Découvrez les techniques d'impression avancées avec IronPDF
Voir sur GitHub

Prêt à commencer ?

Nuget Downloads 21,916,531Version :2026.11vient de sortir