I need to print a text file automatically with the default printer (I mean print on paper, not print to the screen). I've found a bunch of disorganized information everywhere about how to do this, but none of it really helps. I was wondering if someone could give me an example function for printing "example.txt".

If anybody knows any tutorials, it would also be nice to hear about them.