xharbour & epson thermal printers

120 views
Skip to first unread message

wally schwarz

unread,
Jun 19, 2021, 8:42:20 PM6/19/21
to Harbour Users
I have an older version of xhabour (back from Patrick was maintaining it).

All of my code (maybe 40,000 lines of Clipper S'87) is "green" screen, character based. 

I'm trying to find some code snippets on how to send printer output to an Epson point of sale printer with the cutter.

I basically want to include some variable text (Product SKU, product title), and print a barcode (code 3 of 9, etc.).

Does anyone have any suggestions to see how to do this?


James Hurlburt

unread,
Jun 19, 2021, 11:14:46 PM6/19/21
to harbou...@googlegroups.com
Re xharbour & epson thermal printers

I spent 20 years in a window manufacturing plant as a programmer.
Used clipper 5.2 for most of that.

We did thermal printers for labeling for the windows. This included barcodes.

The overall scheme.

Figure out how to talk to the epson printer.

The ones I used had 203 dots per inch resolution and were 4" wide.
They had a pcl (printer control language) that let me store graphics
on the printer
Several fonts available, and more were downloadable. It's been
several years since I retired, so it would take a bit of review to
write something for those printers, and probably wouldn't work on the
epson anyway.

When you get so you can send to the printer (parallel, serial or usb)
Then hand code a text string that will print some part of what you
want. Start simple, just a line of text with perhaps numbers. You
will have to do so in the format that the printer will accept.

I realize that this is a discussion about meta printer drivers, but
without a specific model for your printer and a specific interface
method, I can't really get more specific.

If you are willing to put in the time, contact me directly and we can
discuss a bit.

Jim Hurlburt
Bend, OR
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Harbour Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to harbour-user...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/harbour-users/8215ae1f-4872-4187-bab1-0a49bed56305n%40googlegroups.com.
>

Daniel Du Pré

unread,
Jun 20, 2021, 4:39:42 PM6/20/21
to Harbour Users
Hola Wally
La impresoras Epson responden al lenguaje ESC/P de Epson. En los manuales de programación de esas impresoras viene el detalle de los comandos necesarios para poder imprimir todo tipo de cosas.

Yo utilizo ESC/P para imprimir códigos de barras, QR, texto,  cortar el papel y abrir cajones de dinero sin problema, generando un archivo de texto y luego enviando dicho archivo a la impresora a traves de nReturn := printfileraw(cPrinter,cFile,cName)

Saludos
Daniel

Google traductor.

Epson printers respond to Epson's ESC / P language. In the programming manuals of these printers there is a detail of the commands necessary to be able to print all kinds of things.
I use ESC / P to print barcodes, QR, text,  Cut the paper and open cash drawers without problem, generating a text file and then sending said file to the printer through nReturn: = printfileraw (cPrinterName, cFile, cName)

Greetings
Daniel

James Hurlburt

unread,
Jun 21, 2021, 1:00:34 PM6/21/21
to harbou...@googlegroups.com
It sounds like that is your answer Wally. I would verify that the
specific printer you are looking at does handle ESC/P. Probably, but
not a cinch.

Given that, my next step would be to write a small file by hand that
when sent to the printer will print a sample label. Start with
printing one line, then cutting off the label. When you can do that,
add the barcode. Then the other lines.

When you have the proper text figured out in ESC/P, it will be simple
to do a function that accepts the variable data, plugs it into your
template and sends it to the printer port..

I have done the above with many machines, both printers and production
machines over the years.

Let me know if you need any further help.

Jim
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Harbour Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to harbour-user...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/harbour-users/5a235824-a2a1-4821-9834-2f6242bab1dbn%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages