[Mono-bugs] [Bug 73737][Blo] New - printing not implemented
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Mar 2005 18:20:00 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by subs@jbmsystems.com.
http://bugzilla.ximian.com/show_bug.cgi?id=73737
--- shadow/73737 2005-03-15 18:20:00.000000000 -0500
+++ shadow/73737.tmp.20984 2005-03-15 18:20:00.000000000 -0500
@@ -0,0 +1,110 @@
+Bug#: 73737
+Product: Mono: Runtime
+Version: 1.1
+OS: NLD 9
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: subs@jbmsystems.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: printing not implemented
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+Unhandled Exception: System.NotImplementedException: The requested
+feature is not implemented.in <0x00020>
+System.Drawing.Printing.PrinterSettings:set_PrinterName (string)in
+<0x0007c> MonoTest.Class1:Main (string[])
+
+Steps to reproduce the problem:
+using System;
+using System.Drawing;
+using System.Drawing.Printing;
+
+namespace MonoTest
+{
+ /// <summary>
+ /// No-forms printer for testing Mono
+ /// </summary>
+ class Class1
+ {
+
+ [STAThread]
+ static void Main(string[] args)
+ {
+ string prntName;
+ prntName = GetPrinterName();
+ PrintDocument pd = new PrintDocument();
+ pd.PrintPage += new PrintPageEventHandler
+(pd_PrintPage);
+ pd.PrinterSettings.PrinterName = prntName;
+ pd.Print();
+ }
+
+ static string GetPrinterName()
+ {
+ // get printer name
+ Console.WriteLine("Please enter a printer name:");
+ string prntName = Console.ReadLine();
+ return prntName;
+ }
+
+ static string GetImagePath()
+ {
+ // get image path
+ Console.WriteLine("Please enter a graphic path:");
+ string grafName = Console.ReadLine();
+ return grafName;
+ }
+
+ private static void pd_PrintPage(object sender,
+PrintPageEventArgs e)
+ {
+ // do some text
+ PointF strPnt = new PointF(50, 50);
+ Font strFnt = new Font("New Times Roman", 12);
+ SolidBrush strBrsh = new SolidBrush
+(Color.CadetBlue);
+ e.Graphics.DrawString("This is an actual piece of
+text", strFnt,
+ strBrsh, strPnt);
+ strBrsh.Dispose();
+ // do a filled rectangle
+ Rectangle rect = new Rectangle(50, 200, 500, 200);
+ SolidBrush fillRect = new SolidBrush(Color.Blue);
+ e.Graphics.FillRectangle(fillRect, rect);
+ Pen drwRct = new Pen(Color.Red, 3);
+ e.Graphics.DrawRectangle(drwRct, rect);
+ fillRect.Dispose();
+ // do a graphic
+ string grfFile = GetImagePath();
+ Bitmap img = new Bitmap(grfFile);
+ e.Graphics.DrawImageUnscaled(img, 50, 450);
+ }
+ }
+}
+
+1.
+2.
+3.
+
+Actual Results:
+
+
+Expected Results:
+print of a supplied graphic and a colored box
+
+How often does this happen?
+always
+NDL and windows
+
+
+Additional Information: