Silverlight 4 Printing

Printing in Silverlight has been made pretty simple, how it comes with some caveats because it opnly supports rasterized image printing.  Not 100% a problem but in LOB applications will run into issue with printing thinks like PDF, because all formatting is lost in reflect to the final printed document.

Here is a quick code method on printing in Silverlight 4:

[sourcecode langauge=”csharp”]
PrintDocument documentToPrint= new PrintDocument();
documentToPrint.DocumentName = "Sample Document";
documentToPrint.StartPrint += new EventHandler(documentToPrint_StartPrint);
documentToPrint.PrintPage += new EventHandler(documentToPrint_PrintPage);

One thought on “Silverlight 4 Printing

Leave a Reply