Link to home
Start Free TrialLog in
Avatar of MGothelf
MGothelfFlag for United States of America

asked on

Print without user intervention

We have an application that creates log files throughout the day.  I need to print the contents of each log file as soon as its created.  I have written a program that uses a FileSystemWatcher to catch the file, and I can read the contents, but how do I print to a printer without any user intervention?  The report is very simple, basicaly I am just listing out six(6) text fields - I don't need graphics, or font control, just need to print the text.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Printing within C# is not as simple operation as it could, but it can be accomplished with a PrintDocument instance.

Bob
Avatar of MGothelf

ASKER

What is a printDocument, and how do I use it???
Here read this article, and if it doesn't help or doesn't make sense, let me know.

Master Everyday Printing in .NET
http://www.ftponline.com/vsm/2002_11/magazine/features/eaton/

Bob
Thanks, that did the trick.  I will award the points but maybe you can answer a related question.  The text file in question is a fax transmission log.  The fax is also stored as a TIFF file.  The user now would like to print a mini copy of the first page of the TIFF file.  Any ideas how to do that?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial