Detener la impresi贸n de EPSON LX-300
Tengo que imprimir un recibo en un papel que es 1/2 del papel A4 en una impresora lx300 nesecito que cuando imprima detenga la impresora y no siga alimentando el papel. Si alguien puede ayudarme se lo agradecer茅 eternamente. Ya que de esto depende la continuaci贸n en mi trabajo.
Mail : [email protected]
Mail : [email protected]
Me parece que es preferible que en la configuracion de impresora definas el tama帽o del papel, es decir una hoja configurable a tu interes, claro eso es si solo imprimes eso en esa impresora, sino usa los botones de Dialog de la barra de componentes, de todas formas te mando algo que no se si te servira:
es sacado de la ayuda del builder(que a lo mejor ya viste):
This example uses a button, a Page Control, and a Print dialog box on a form. When the user clicks the button, the print dialog is displayed. The user can select any subset of the pages in the page control for printing. The selected pages are then printed.
To run this example successfully, you must include <Printers.hpp> in your unit file.
procedure TForm1.Button1Click(Sender:TObject);
var
I, Start, Stop: Integer;
begin
PrintDialog1.Options := [poPageNums, poSelection];
PrintDialog1.FromPage := 1;
PrintDialog1.MinPage := 1;
PrintDialog1.ToPage := PageControl1.PageCount;
PrintDialog1.MaxPage := PageControl1.PageCount;
if PrintDialog1.Execute then
begin
{ determine the range the user wants to print }
with PrintDialog1 do
begin
if PrintRange = prAllPages then
begin
Start := MinPage - 1;
Stop := MaxPage - 1;
end
else if PrintRange = prSelection then
begin
Start := PageControl1.ActivePage.PageIndex;
Stop := Start;
end
else { PrintRange = prPageNums }
begin
Start := FromPage - 1;
Stop := ToPage - 1;
end;
end;
{ now, print the pages }
with Printer do
begin
BeginDoc;
for I := Start to Stop do
begin
PageControl1.Pages[I].PaintTo(Handle, 10, 10);
if I <> Stop then
NewPage;
end;
EndDoc;
end;
end;
end;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
PrintDialog1->Options.Clear();
PrintDialog1->Options << poPageNums << poSelection;
PrintDialog1->FromPage = 1;
PrintDialog1->MinPage = 1;
PrintDialog1->ToPage = PageControl1->PageCount;
PrintDialog1->MaxPage = PageControl1->PageCount;
if (PrintDialog1->Execute())
{
int Start, Stop;
// determine the range the user wants to print
switch (PrintDialog1->PrintRange)
{
case prSelection:
Start = PageControl1->ActivePage->PageIndex;
Stop = Start;
break;
case prPageNums:
Start = PrintDialog1->FromPage - 1;
Stop = PrintDialog1->ToPage - 1;
break;
default: // prAllPages
Start = PrintDialog1->MinPage - 1;
Stop = PrintDialog1->MaxPage - 1;
break;
}
// now, print the pages
Printer()->BeginDoc();
for (int i = Start; i <= Stop; i++)
{
PageControl1->Pages[i]->PaintTo(Printer()->Handle, 10, 10);
if (i != Stop)
Printer()->NewPage();
}
Printer()->EndDoc();
}
}
es sacado de la ayuda del builder(que a lo mejor ya viste):
This example uses a button, a Page Control, and a Print dialog box on a form. When the user clicks the button, the print dialog is displayed. The user can select any subset of the pages in the page control for printing. The selected pages are then printed.
To run this example successfully, you must include <Printers.hpp> in your unit file.
procedure TForm1.Button1Click(Sender:TObject);
var
I, Start, Stop: Integer;
begin
PrintDialog1.Options := [poPageNums, poSelection];
PrintDialog1.FromPage := 1;
PrintDialog1.MinPage := 1;
PrintDialog1.ToPage := PageControl1.PageCount;
PrintDialog1.MaxPage := PageControl1.PageCount;
if PrintDialog1.Execute then
begin
{ determine the range the user wants to print }
with PrintDialog1 do
begin
if PrintRange = prAllPages then
begin
Start := MinPage - 1;
Stop := MaxPage - 1;
end
else if PrintRange = prSelection then
begin
Start := PageControl1.ActivePage.PageIndex;
Stop := Start;
end
else { PrintRange = prPageNums }
begin
Start := FromPage - 1;
Stop := ToPage - 1;
end;
end;
{ now, print the pages }
with Printer do
begin
BeginDoc;
for I := Start to Stop do
begin
PageControl1.Pages[I].PaintTo(Handle, 10, 10);
if I <> Stop then
NewPage;
end;
EndDoc;
end;
end;
end;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
PrintDialog1->Options.Clear();
PrintDialog1->Options << poPageNums << poSelection;
PrintDialog1->FromPage = 1;
PrintDialog1->MinPage = 1;
PrintDialog1->ToPage = PageControl1->PageCount;
PrintDialog1->MaxPage = PageControl1->PageCount;
if (PrintDialog1->Execute())
{
int Start, Stop;
// determine the range the user wants to print
switch (PrintDialog1->PrintRange)
{
case prSelection:
Start = PageControl1->ActivePage->PageIndex;
Stop = Start;
break;
case prPageNums:
Start = PrintDialog1->FromPage - 1;
Stop = PrintDialog1->ToPage - 1;
break;
default: // prAllPages
Start = PrintDialog1->MinPage - 1;
Stop = PrintDialog1->MaxPage - 1;
break;
}
// now, print the pages
Printer()->BeginDoc();
for (int i = Start; i <= Stop; i++)
{
PageControl1->Pages[i]->PaintTo(Printer()->Handle, 10, 10);
if (i != Stop)
Printer()->NewPage();
}
Printer()->EndDoc();
}
}
