Re: Printing the whole whole printable area
- From: Abhay <abhayjoukani@xxxxxxxxx>
- Date: Mon, 18 Jun 2007 13:11:13 -0700
Peter Duniho wrote:
On Mon, 18 Jun 2007 02:37:43 -0700, Abhay <abhayjoukani@xxxxxxxxx> wrote:
void pd_PrintPage(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawRectangle(Pens.Black,
e.PageSettings.PrintableArea.X, e.PageSettings.PrintableArea.Y,
e.PageSettings.PrintableArea.Width,
e.PageSettings.PrintableArea.Height);
}
this.is exactly what i want to print and its not showing the BOTTOM
and RIGHT Margins
What happens when you use FillRectangle instead? Or pass Width - 1 and
Height - 1 to DrawRectangle?
Note that, just as is the case in on-screen graphics, the coordinate
system is relative to a virtual grid and your rectangle's lines are drawn
just to the right and below of the intersection on this grid defined by
the coordinates of a given point. This means that the right and bottom of
your rectangle are being drawn just outside of the printable area. You
need to inset the right and bottom by a pixel to get the line into the
boundary of the printable area.
Pete
Thanks for your reply Peter but that is not the case according to me
i tried to reduce the pixel by 1 (around 15 infact) then to it dose'nt
show me the RIGHT and the BOTTOM margin
eg :- if the printable area is (Left,Top,Right,Bottom) :-
(16,16,818,1068) i have to reduce it to say (16,16,803,1053) then only
it prints out the rectangle correctly
.
- Follow-Ups:
- Re: Printing the whole whole printable area
- From: Peter Duniho
- Re: Printing the whole whole printable area
- References:
- Printing the whole whole printable area
- From: Abhay
- Re: Printing the whole whole printable area
- From: Abhay
- Re: Printing the whole whole printable area
- From: Peter Duniho
- Printing the whole whole printable area
- Prev by Date: Re: Regex, replace and quantifiers
- Next by Date: Re: new and operator ++
- Previous by thread: Re: Printing the whole whole printable area
- Next by thread: Re: Printing the whole whole printable area
- Index(es):
Relevant Pages
|