Link to this page
C# Print PDF
You can use IronPDF to print a PDF and there are two meanings of that. One is can I use IronPDF to print an existing document? Let's say an HTML file and turn that into a PDF programmatically. Yes, you can. IronPDF allows you to virtually print an HTML document as a PDF file. But IronPDF does much more. It also allows us, the developer, to print PDFs using physical printers. The, within the PDF document class reference, you'll notice a set of print functionality that allow us to print directly to a physical printer, with or without user interface dialog from the operating system, such as Print Setup, and it allows us also to create a Microsoft print document object, a .Net, a .Net native class reference that allows us to control the printing of our document. But basically yes, IronPDF can print HTML to PDF. It can also take any existing PDF and send it to your printer to be printed on paper.
The method I use to send the PDF to the physical printer is quite simple. You use PDF document.print. You will find within that method that there are many overrides, you should look through the IntelliSense or object reference documentation to look at all your options, because you can control so much about the printing process, including the whether or not you want the user to print silently or after you give the user a Print Setup dialog. Do you want to control the resolution of the PDF? And so on and so forth. There are lots of options.
You do not need Iron Adobe Acrobat to print. IronPDF is one of the few ways to print a PDF to a physical printer in .Net, or with C#, that does not require Adobe Acrobat to be installed anywhere, and this means we can use IronPDFs print functionality in the cloud. We can use it on web servers, we can also use it within royalty free redistribution, ie, inside your product that prints PDFs.
IronPDF allows you to control which of the installed physical and network printers you're going to send a print to.