int Y = 10; int pag; bool enc; enc = true; Graphics::TBitmap *mapa = new Graphics::TBitmap(); try { mapa->LoadFromFile("Imagenes\\logop.bmp"); mapa->Transparent = false; mapa->TransparentColor = mapa->Canvas->Pixels[50][50]; mapa->TransparentMode = tmAuto; }catch(...) { enc = false; } if (impri->Execute()) { Printer()->Title = "Listado"; Printer()->Canvas->Font = fuente->Font; Printer()->BeginDoc(); for (int n=0; n<impri->Copies; ++n) { //encabezado pag = 1; if (enc) { Printer()->Canvas->Draw(10,Y,mapa); } Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(Printer()->PageWidth-150,Y, "Pagina "+AnsiString(pag)); Y += mapa->Height+ Printer()->Canvas->TextHeight("XXX")); Printer()->Canvas->TextOutA(10,Y,"Wepssoft Software"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(10,Y,"Cyber Ventas"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(10,Y,"Compañia: FC Ciber"); Y += Printer()->Canvas->TextHeight("XXX"); Y += Printer()->Canvas->TextHeight("XXX"); Y += Printer()->Canvas->TextHeight("XXX"); //texto que quieras imprimir Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->MoveTo(0,Y); Printer()->Canvas->LineTo(Printer()->PageWidth,Y); Y += Printer()->Canvas->TextHeight("XXX"); Y += Printer()->Canvas->TextHeight("XXX"); if (Y >Printer()->PageHeight) { Printer()->NewPage(); Y = 10; ++pag; if (enc) { Printer()->Canvas->Draw(10,Y,mapa); } Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(Printer()-> PageWidth-150,Y,"Pagina" +AnsiString(pag)); Y += (mapa->Height+Printer()-> Canvas->TextHeight("XXX")); Printer()->Canvas->TextOutA(10,Y, "Wepssoft Software"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(10,Y, "Ventas"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(10,Y, "Compañia: Ciber"); Y += Printer()->Canvas->TextHeight("XXX"); Y += Printer()->Canvas->TextHeight("XXX"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->TextOutA(10,Y,"Codigo"); Printer()->Canvas->TextOutA(600,Y,"Producto"); Printer()->Canvas->TextOutA(1200,Y,"Grupo"); Printer()->Canvas->TextOutA(1800,Y,"Cant"); Printer()->Canvas->TextOutA(2100,Y,"Precio"); Y += Printer()->Canvas->TextHeight("XXX"); Printer()->Canvas->MoveTo(0,Y); Printer()->Canvas->LineTo(Printer()->PageWidth, Y); Y += Printer()->Canvas->TextHeight("XXX"); } } Printer()->EndDoc(); } delete mapa;