// Rewrited due to using of exsisting event and reading with FileStream public void Print(object source, StartPrintEventArgs args) { args.FsStream.Position = 0; for (int i = 0; i < args.FsStream.Length; i++) { // simulate printing Console.Write(Convert.ToChar(args.FsStream.ReadByte())); } Console.WriteLine(); }
private static void OnStartPrint(object source, StartPrintEventArgs args) { StartPrint(null, args); }