[Mono-bugs] [Bug 529486] New: Print Preview causes PrintDocument to always preview, never print

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Aug 8 15:09:13 EDT 2009


           Summary: Print Preview causes PrintDocument to always preview,
                    never print
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: novellmono at mobydisk.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729)

Once a System.Drawing.PrintDocument is assigned to a
System.Windows.Forms.PrintPreview, that PrintDocument will never print to the
printer, even when specifically told to do so.  It will always print to the
PrintPreview object, even if that object is disposed.

Reproducible: Always

Steps to Reproduce:
1. Instantiate a System.Drawing.PrintDocument (prDocument)
2. Instantiate a System.Windows.Forms.PrintPreview (prPreview)
3. Assign the PrintDocument to the PrintPreview
4. Display the PrintPreview in a Window
5. Call PrintReport() on the PrintDocument instance
Actual Results:  
Nothing happens.

Expected Results:  
The document should print.

There are some other symptoms of this same bug:
- The PrintAction on the print event is always set to PrintToFile.
- PrintDocument.PrintController.IsPreview is set to true

1) Is this a bug in the PrintDocument, or in the PrintPreview?  Ex: If I write
my own control to preview a PrintDocument, will this still happen?

2) Workaround: If you instantiate a new PrintDocument to perform the actual
printing, it works.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list