How to print a receipt using POS printers?

Hello.
I have Epson T20 POS printer. i tried to print one column from a grid after change its view from horizontal to vertical. only got the grid title printed in very long paper! tried to print from pdf, the printer only move the paper out [about two cm]!!
No problem with printer driver because test page printing goes very well.
any one help me to figure out how to setup my report or grid to be printed perfectly as a receipt?
Appreciate your help.

Thanks

Epson T20 POS Printer.

41Yg3fzY5yL.SY300.jpg

The problem is that label printers are no ordinary printers. They listen to special commands. As your webapplication is not ā€˜hangingā€™ on that printer as a desktop application does, this is hard to solve. The only solution I could think of - and I donā€™t know if itā€™s available for your printer - is some kind of com file so that your javascript in the client can access your printer. I still use a Delphi client with soap protocol to solve label printing issues.

Iā€™am printing adress labels from a scriptcase app to a Zebra label printer. But, thatā€™s not on the direct way ā€¦ The special commands, mentioned from aducom, are generated from Nicelabel (a label software). Iā€™am filling a database table in my SC app with the print output and Nicelabel read & printed this on the zebra printer. Works 1a, but not just so ā€¦

Look at this https://code.google.com/p/jzebra/

That is VERY promissing. Do you have experience with this?

Did some testing and itā€™s working well! Now I can get rid of my Delphi Clients. Tnx!!

No. I just followed because I will need it in my next project.

Can you share the howto? :rolleyes:

Thanks a lot. ā€˜Albertā€™ ā€˜Reinhardā€™ and ā€™ Giuā€™.
Albert would you please share your experience with this issue?

All the best
Hero

[QUOTE=Giu;23755]No. I just followed because I will need it in my next project.

Can you share the howto? :rolleyes:[/QUOTE]

So far I just downloaded the package and looked into the samples there. Itā€™s a bit of javascript which is used to include the java package and a bit of javascript to get the printing done. With the sample I was able to download and print a pdf directly without any problems. So I need to find a way to integrate it into scriptcase and I will share that info (as I always do :wink: But for someone who knows how to integrate javascript this should be doable w.o. much trouble afaik. A matter of downloading, installing andā€¦ run?

Hey guys, Iā€™ve very good news about this issue. i removed my printer driver [witch i installed from devices and printers : Have a disk] and i followed the instructions carefully to install the driver from Epson T20 CD and i really did not believe my eyes when i saw my receipt printed, i tried to print special characters from different languages, all tests are done perfectly.
Attached photo is Scriptcase grid row [vertical view] from Scriptcase samples, proof of what i am talking aboutā€¦
We donā€™t need Java any more :cool:

Photo-0088.jpg

The only issue i am facing now is Pdf printing. yes it is print from Pdf but the printing area is very small, Iā€™ll try to fix this problem.

New Epson intelligent POS printer, print directly from the browser without any problem
http://www.epson.com.au/pos/products/receiptprinters/DisplayMain.asp?id=tm-t70-i

My current and temporary solution is to print my receipt as PDF (I use PDF Factory) then print using my POS printer - Epson TM20 , two steps but works for me.
Note: You need to edit paper size in PDF factory, width between 75 to 90 mm (make your own settings to fit your purpose).

You have additional options to print to a Epson Thermal POS printer, just like the one you show above.

My approach is to use browser print an Invoice created with the margins suitable to the width of the printer. This approach relies on a suitable windows driver being installed on the pc.

My preferred approach is to use raw printing. Print direct to the POS printer, by coding your receipt printing page to send escpos commands. This is similar to teh Zebra approach on teh previous page.

I prefer to use this library from https://github.com/mike42/escpos-php as this gives me more control from my application.

Hope it helps others as well.

Anil

[QUOTE=madikonda;30549]You have additional options to print to a Epson Thermal POS printer, just like the one you show above.

My approach is to use browser print an Invoice created with the margins suitable to the width of the printer. This approach relies on a suitable windows driver being installed on the pc.

My preferred approach is to use raw printing. Print direct to the POS printer, by coding your receipt printing page to send escpos commands. This is similar to teh Zebra approach on teh previous page.

I prefer to use this library from https://github.com/mike42/escpos-php as this gives me more control from my application.

Hope it helps others as well.

Anil[/QUOTE]

We discarted QZPrinter, for example, because this canā€™t work from a tablet, and we are going for the same approach, using RAW printing with fopen. Did you tried under Windows OS? We are having problems accesing USB printers, because on Windows there arenā€™t something like ā€œ/dev/lp0ā€ and we are accessing the printer, sharing it and with //localhost/USBPrinterName

In local this works but we get permission denied over a shared printer in other machine like //anotherComputer/USBPrinterName

Some idea?

Note: For clarification, we are doing something like a spool service. A point where all petitions goes and from there printing is distributed.

Likely the rights of user of the service of your apache server doesnt allow access to the external devices. Create a seperate user with the rights to print and make that the user that runs the apache service (this also works for the apache service from scriptcase of course).

Hi Guys
very interesting this thread for meā€¦ one question and one idea:

  • is there a tutorial for make a pdf and print it to a printer the system where the browser is installed, knows?

And do you know Google Cloud Print? http://www.google.com/intl/en_EN/cloudprint/learn/

I use this with another programm. My Printer is only connected to a raspberry PI, which has wireless stick. So i can place my printer where ever i want and can print from every place on the world and from every machine, which has internet. Maybe you can also connect a POS printer like this?

Best regards
Steve

Has anyone integrated the Mike42 library into Scriptcase? Regards.

1 Like

I know nothing of Mike42 library, but I wanted to chime in here and say that Im using direct ZPL language commands sent to Zebra printers within Scriptcase and it works well.
I am also using a third party ā€œprint serverā€ from RocketShipIt that allows me to print from any webpage (Scriptcase page) to just about any label printer through a machine running the RocketShipIt print server. https://www.rocketship.it/products/thermal-print-server