My program maintains a log file (text file) which records the activities done. I'm trying to use the Printer Object to print the file but it's not printing properly. I tried using the PrintDocument Component too but am getting lots of errors. There is a menu bar control which when invoked should print the entire contents of the file.

I don't want the user to specify what to print. Instead, the control should directly print the entire file to the default printer. I'm & don't know what to do. Please help.