PRB: The PrintDocument Object Prints a Graphical Object with Incorrect Margins (817042)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
- Microsoft Windows XP Professional
- the operating system: Microsoft Windows XP 64-Bit Edition
SYMPTOMSWhen you print a graphical object, what appears on the page is shifted away from the position that you expect it to appear in. The distance that the graphical object is shifted depends on the margins that have been set on the printer.
To explain in more detail, when you use
the PrintPageEventArgs.Graphics object to print a graphical object on the PrintPage event of the PrintDocument object, PrintDocument ignores the actual physical margins (that is, the printer limitations) of the selected printer. Instead, the printout is shifted according to the margin settings of the
printer.RESOLUTION.NET Framework 1.1 To resolve this problem in version 1.1, set the following margin
values before you print the document: PrintDocument1.OriginAtMargins = True STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
For more information about the PrintDocument class, visit the following MSDN Web site:
Modification Type: | Minor | Last Reviewed: | 5/3/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbprb kbWindowsForms kbGDIPlus kbgdipprinting kbGDI KB817042 kbAudDeveloper |
---|
|