the code below doesnt print a 20 page document. it
just prints the first page and then keeps shooting out
blanks.
any suggestions.
[/CODE]
TPrinter *P;
P = Printer();
int Xpos = 100;
int Ypos = 100;
int LineHeight;
LineHeight = LineHeight = RichEdit1->Font->Size * 5;
P->Canvas->Font = RichEdit1->Font;
P->BeginDoc();
for (int x = 0; x < RichEdit1->Lines->Count; x++)
{
P->Canvas->TextOut(Xpos, Ypos, RichEdit1->Lines->Strings [x]);
Ypos = Ypos + LineHeight;
if (Ypos > P->PageHeight - (LineHeight * 20))
{
Ypos == 100;
P->NewPage();
}
}
P->EndDoc();
just prints the first page and then keeps shooting out
blanks.
any suggestions.
[/CODE]
TPrinter *P;
P = Printer();
int Xpos = 100;
int Ypos = 100;
int LineHeight;
LineHeight = LineHeight = RichEdit1->Font->Size * 5;
P->Canvas->Font = RichEdit1->Font;
P->BeginDoc();
for (int x = 0; x < RichEdit1->Lines->Count; x++)
{
P->Canvas->TextOut(Xpos, Ypos, RichEdit1->Lines->Strings [x]);
Ypos = Ypos + LineHeight;
if (Ypos > P->PageHeight - (LineHeight * 20))
{
Ypos == 100;
P->NewPage();
}
}
P->EndDoc();
Code:
tomcruz.net