Hi,
I need to print some page in portrait and same in landscape. I use 2 richviewedit, one is load with document that will be print in postrait orientation and one with the document that will be print in landscape orientation. The exemple from http://www.trichview.com/forums/viewtopic.php?t=87
doesn't work. I try to print one document and then the second document (the content of richviewedit but doesn't work).
Please help me!
void __fastcall TForm1::Button3Click(TObject *Sender)
{
TPrinter *prt= new TPrinter;
PrintDialog1->Execute();
{
prt->Orientation=poPortrait;
prt->BeginDoc();
RVPrint1->AssignSource(re) ;
RVPrint1->FormatPages(rvdoALL);
RVPrint1->Print("Titlu",1,false);
prt->EndDoc();
prt->Orientation=poLandscape;
prt->BeginDoc();
RVPrint1->AssignSource(rv1);
RVPrint1->FormatPages(rvdoALL);
RVPrint1->Print("Titlu",1,false);
prt->EndDoc();
}
}
the second document rv1 is printing in portrait mode.
Problem with printing portrait and landscape
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Do not create a new TPrinter object.
Instead of
use
Instead of
Code: Select all
TPrinter *prt= new TPrinter;
Code: Select all
TPrinter *prt= Printer();