Simple Printing

Joined
Mar 14, 2014
Messages
12
Programming Experience
10+
I could really use help with a simple print job. I have Googled for three days and can't get what I want.

I am trying to print simple report cards. My first thought was a webbrowser object, because I am good with HTML, and I can design a simple form, populate variables, and print each one. Problem is that showprintdialog doesn't save settings, so user would choose printer for every page or use .print, which uses default printer only.

Found LOTS of threads on printdocument with printdialog. Problem is, they don't show how to write the individual lines and tables to the printdocument.

I would appreciate any guidance. If like to avoid third party addins and registry changes. I'd like to simple write the lines to some kind of file and print. Don't want to resort to bit maps as they often print all the background color instead of simple tables and text.

Thanks!
 
I would expect that you'd be able to find a number of examples of the actual drawing part of printing. It's GDI+, the same as drawing on a control or Image. You handle the PrintPage event of your PrintDocument and use GDI+ to draw the printed page, e.g. calling e.Graphics.DrawLine to draw a line.
 
Back
Top