| |

VerySource

 Forgot password?
 Register
Search
View: 752|Reply: 2

On the problem of printing continuous paper feeding

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-9-28 15:00:01
| Show all posts |Read mode
I use a bs_300k printer and use delphi to write directly to the parallel port. After how to go 6-7, the ticket will jump up a bit.
strange
PrntTicketno:=Copy(ATicketno,(length(ATicketNo)-1),2);
  AMoney:=Num2CNum(StrToInt(AMoney));
  PrintChannel:=getSetupIni('Current','no');
  stationId:=getSetupIni('Current','id');
  Assignfile(f,'LPT1');
  rewrite(f);
  {Initialize printer}
// Write(f,chr(27)+'@'); //chr(27)=ESC
  {Set the display mode of Chinese characters}
  //write(f,chr(28)+chr(ord('&'))); //chr(28)=FS
  {Set relative horizontal position of printing}
// Write(f,chr(27)+chr(ord('\'))+chr($FF)+chr($00));

  Write(f,chr(28)+chr(51)+chr(63));
  Write(f,chr(27)+chr(43)+chr(63));


  //Set high-speed printing
// write(f,chr(28)+chr(ord('x'))+chr($01));
  Writeln(f);
  Writeln(f,''+stationid+''+PrintChannel+''+Auserid+''+PrntTicketno);
  Writeln(f);
  write(f,chr(27)+chr(ord('\'))+chr($CF)+chr($00));
  //Enlarge the amount font
  Write(f,chr(28)+chr(ord('W'))+chr($01));
   Write(f, ''+AMoney);
  //Remove the enlarged font
  Write(f,Chr(28)+chr(ord('W'))+chr($00));

  Writeln(f);
  Writeln(f);
  write(f,chr(27)+chr(ord('\'))+chr($CF)+chr($00));

  Writeln(f,''+Apntdate+''+ApntTime);

  Write(f,chr(27)+chr(ord('J'))+chr($FF));

  Write(f,chr(11));


  flush(f);
  Closefile(f);
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-9-30 11:30:01
| Show all posts
The code is too long...
However, I used to work as a POS system. Two methods were used when printing receipts: a printer with a hard font library, directly writing ESC/POS command control to the port, which happened to be the EPSON-TM210 series or compatible series; The PRINTERS object of the hard font library is very useful!
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-9-30 23:00:01
| Show all posts
Yes, I also use the built-in command library of epson, and write directly in the parallel port.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list