.NET Printing

S

S Shulman

Hi

I am looking for a good sample code for .NET printing

Specifically I code that prints tables and populates the data into the cells

Thank you,
Shmuel Shulman
SBS Technologies LTD
 
L

Lloyd Dupont

While printing seems daunting at first it is, in fact, real easy!
To test it and become acquinted with it I suggest you play with a
PrintDocument like that:

class MyDocument : PrintDocument
{
protected override void OnPrintPage(PrintPageEventArgs e)
{
e.Graphics.FillRect(Brushes.LightGray, new Rectangle(10, 10, 100, 100));
e.HasMorePages = false;
}
}

and print with a code like that:
MyDocument doc = new MyDocument();
doc.Print();

While it's extremely basic it will get you going and help you realize
printing is not so complex....
Good luck ;-)
 
M

Michael J. Ryan (tracker1)

S said:
I am looking for a good sample code for .NET printing

Specifically I code that prints tables and populates the data into the
cells

May want to look at iTextSharp <http://itextsharp.sourceforge.net/> for
the actual formatting, you should be able to print the document fairly
easily once it's created... not 100% sure on this though.. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

News Group 2
Reporting Tools 1
Clipboard Related Question 5
bitwise operations 1
[email protected] 1
String Methods 3
Menu Question 3
NumericUpDown Control 2

Top