Fórum Problemas com comprovante writeln impressora injeta muita folha. #414363
21/03/2012
0
To com um problema aqui que não consigo resolver.
Eu tenho esse codigo abaixo para imprimir direto na porta da impressora bematech não fiscal.
var
Handle: TextFile;
begin
inherited;
if edtDinheiro.Text <>0,00 then
begin
if PrintDialog1.Execute then
AssignFile(Handle,LPT1);
Rewrite(Handle);
Writeln(Handle,);
Writeln(Handle, Empresa xxxxxxxx);
Writeln(Handle, (00)0000-0000);
Writeln(Handle,);
Writeln(Handle, COMPROVANTE);
Writeln(Handle, sem valor fiscal );
Writeln(Handle,);
Writeln(Handle, Data.: + DateToStr(date) + +Hora.: + TimeToStr(Time));
Writeln(Handle,-----------------------------------------------);
Writeln(Handle, Produto);
Writeln(Handle, Código Quant. Pr. Unit. Pr. Total);
Writeln(Handle,-----------------------------------------------);
Writeln(Handle,);
frmVendas.cdsItems.First;
While not frmVendas.cdsItems.Eof do
begin
Writeln(Handle, frmVendas.cdsItemsDescricao.Text);
Writeln(Handle, frmVendas.cdsItemsCodigo.Text);
Writeln(Handle, ,frmVendas.cdsItemsQuantidade.Text+X + frmVendas.cdsItemsPreco.Text + ,frmVendas.cdsItemsValorTotal.Text);
frmVendas.cdsItems.Next;
end;
Writeln(Handle,-----------------------------------------------);
Writeln(Handle,SubTotal.: + +R$+ +frmVendas.cdsItemsSubTotal.Text);
Writeln(Handle,+DM.cdsItensFORMAPAGAMENTO.Text);
Writeln(Handle,Parcelas.:+ +1);
Writeln(Handle,Cliente.:+ +DM.cdsItensCLIENTE.Text);
Writeln(Handle,Vendedor.:+ +DM.cdsItensVENDEDOR.Text);
Writeln(Handle,);
Writeln(Handle,-----------------------------------------------);
Writeln(Handle,);
Writeln(Handle,);
Writeln(Handle,);
Writeln(Handle, ___________________________________________ );
Writeln(Handle, Assinatura );
Writeln(Handle,);
Writeln(Handle,);
Writeln(Handle, OBRIGADO PELA PREFERENCIA );
Writeln(Handle,);
Writeln(Handle,);
Writeln(Handle,#12);
CloseFile(Handle);
end;
end;Ela imprimi normalmente o problema é que ela esta injetando muita folha, ela injeta uma folha maior que uma folha A4.
Fiz algumas configurações na impressora e mandei imprimir uma página de teste ela injeta a folha do tamanho que eu configurei, mais quando mando imprimir pelo sistema ela injeta muita folha.
Se alguém puder me ajuda ficarei grato.
Jalves
Curtir tópico
+ 0Posts
21/03/2012
Joel Rodrigues
Gostei + 0
21/03/2012
Jalves
Gostei + 0
21/03/2012
Joel Rodrigues
Gostei + 0
21/03/2012
Jalves
Writeln(Handle,#12);
E adicionei algumas linhas em branco.
Agora tá ok.
Valeu pela força.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)