PrintDocument printDoc = doc.PrintDocument īy using the Step 2 method to print all the pages with the default printer, it will start to print the PDF files automatically when you process it. Set the name of the printer which is to print the PDFĭoc.PrinterName = Another option would be to open PRN files. Set the pagenumber which you choose as the final page to printĭoc.PrintToPage = It appears that it is designed for selecting a printer and using its capabilities, but not so much for the document which is being printed. To print such files in Windows, the user shall right-click the file and selecting Microsoft Office Document Imaging. Set the pagenumber which you choose as the start page to printĭoc.PrintFromPage = If (dialogPrint.ShowDialog() = DialogResult.OK) At this point, print jobs sent to the printer will be processed by the driver and sent to the file you indicated in step two instead of being printed. Finally, confirm that your file-port is created and is checked as the current port in use. Your PC needs to install a printer driver that can be used. You used to be able to print these files to your local printer by using the command COPY /B C:\FILENAME.PRN LPT1. In our example, we use C:\ZebraPrinterOutput.txt. Then open the drop-down list box labeled Printer, and select Print to File. Sometimes you will end up with one of these files and need to print it. It’s basically a generic output file that printers can understand. PrintDialog dialogPrint = new PrintDialog() ĭ = 1 ĭ = ĭ = 1 ĭ = A PRN file is a type of file that can be read by printers.