When asked about printing, most developers will recoil in horror and rather avoid the topic. For some us though, we don’t have any choice but to tackle the problem full on. Luckily, in true .Net style, printing has become a much easier problem to take on. I recently undertook a large printing task that required designing and architecting a printing framework that could be used in a rich desktop application, allowing pretty much any control in the application (third-party or in-house), to be printable through a common print preview view complete with WYSIWYG page setup, headers / footers etc etc. Quite a task!
As usual there is a wealth of information on the web on the topic of printing, although I found most of it to be quite disparate and specialised with very few complete examples and gotchas. In this series of posts I intend to cover as many aspects of printing as possible to try and give a better understanding and concrete examples, as a kind of map through the printing underworld. To this end, this series of posts will spare the detail in favour of providing a more general end-to-end look at printing with links to greater detail for those that are interested.
In part 1 I will try to give a brief overview of printing in WPF and get you started with some code for getting hold of a list of local printers and what you can do with that information.