Here's a simple wrapper for printing text. Built as a class library, this can be used in any .net application. This has automatic word wrapping. I figured that using the new constructor to accept different parameters would easily allow for printing different documents with different settings. I included Name, Font, and Landscape, but the structure is quite simple and can easily be adapted to include or exclude any property or setting.
Usage is quite simple, build a string using linebreaks if needed(C#-'\n', VB-vbNewLine), declare a new PrintDoc, then call the Print() method.
//C# PrintDoc pd = new PrintDoc(MyString); pd.Print(); 'VB Dim pd as New PrintDoc(MyString) pd.Print()
Options include adding a Document name to the top of the printout, using a different font, or using Landscape orientation. The options are included as overloads, Landscape is optional in each overload, when declaring the new PrintDoc.
Hope someone can find this useful.
Edited 3 Years Ago by tinstaafl