Tag Archives: print file

Select and print multiple files in C#

This example lets you easily print multiple files. You can use it, for example, to print all of the .cs files in a project’s directory. Select a printer from the ComboBox at the top. Enter or select a directory and … Continue reading

Posted in files, printers, printing, system | Tagged , , , , , , , , , , , , | 9 Comments

Set a print job name in C#

By default, when you send a PrintDocument to a printer, the printer spool shows the job’s name as “document.” You can change the print job name by setting the PrintDocument object’s DocumentName property. This example uses the following code to … Continue reading

Posted in printers, printing, system | Tagged , , , , , , , , , , , , , | 1 Comment

Print a text file in C#

This example lets you select a printer and file, and then print the file on the selected printer. (Actually this version just displays a print preview. To send the file directly to the selected printer, see the example Send a … Continue reading

Posted in printers, printing, system | Tagged , , , , , , , , , , , , , , , , , | 2 Comments