printing on the right side of paper
From: G.Esmeijer (gerrit_at_nomail.nl)
Date: 07/28/04
- Next message: Kyril Magnos: "Re: C# Error CS1034: compiler limit exceeded (2046 characters)"
- Previous message: John S: "DataTable ?"
- Next in thread: Ron Allen: "Re: printing on the right side of paper"
- Reply: Ron Allen: "Re: printing on the right side of paper"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 22:33:32 +0200
Friends,
I'm (a bit) dissapointed about the printing possibilities in c#. It could
also be lack of knowedge.
I would like to align a text on the right side of the paper when printing.
For example
tekst = DateTime.Today.Date.ToString("dd-MM-yyyy");
// asign content to the variable tekst
SizeF stringSize= ev.Graphics.MeasureString(tekst, printFont);
// measure the length of the tekst ... in what??
xPos = (float) ev.MarginBounds.Right - stringSize;
// to aligh it on thr right side of the paper
ev.Graphics.DrawString (tekst, printFont, Brushes.Black, xPos, yPos, new
StringFormat());
I would like to print tekst now but I have problems with the typing.
I tried all kinds of things but there must be some easy way of doing this.
Who can help me with this..
and who knows a bunch of nice printing functions. I dont like the way C#
handles the printer control.
regards
Gerrit Esmeijer
- Next message: Kyril Magnos: "Re: C# Error CS1034: compiler limit exceeded (2046 characters)"
- Previous message: John S: "DataTable ?"
- Next in thread: Ron Allen: "Re: printing on the right side of paper"
- Reply: Ron Allen: "Re: printing on the right side of paper"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|