Print a PDF to Paper

C# + VB.Net: Print a PDF to Paper Print a PDF to Paper
using IronPdf;

// Create a new PDF and print it
IronPdf.HtmlToPdf Renderer = new IronPdf.HtmlToPdf();
PdfDocument Pdf =  Renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");

// Send the PDF to the default printer to print
Pdf.Print();



//For advanced silent real-world printing options, use  PdfDocument.GetPrintDocument
//Remember to add an assembly reference to System.Drawing.dll
 System.Drawing.Printing.PrintDocument PrintDocYouCanWorkWith = Pdf.GetPrintDocument();
Imports IronPdf
Dim Renderer As IronPdf.HtmlToPdf = New IronPdf.HtmlToPdf
Dim Pdf As PdfDocument = Renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
' Send the PDF to the default printer to print
Pdf.Print
Dim PrintDocYouCanWorkWith As System.Drawing.Printing.PrintDocument = Pdf.GetPrintDocument

Prints this PDF by sending it to the computer's default printer. Windows print UI dialogs will be displayed to the user.

Silent and advanced printing options are exposed to the native .Net Frameowrk PrintDocument object via the PdfDocument.GetPrintDocument method. To use this method you will need to add an assembly reference to System.Drawing.dll