anastaciocintra/escpos-coffee

print "0" at all starts of line

Opened this issue · 7 comments

I'm using a nixdorf TH210 printer and an epson one.

  1. When I print on the epson using CP858, all is OK. When a print on the nixdorf, special chars like "é è" are KO. They works if I select Canadia french, not CP858
  2. In all cases, I cannot print the euro symbol "€"
  3. On the TH210 I also get a 0 at all start of lines (like a CR/LF issue..).

Desktop (please complete the following information):

  • OS: Windows 10
  • Lib Version 4.1.0
  • Java Version 1.8.0_172

Thank you.
Regards.

I've found part of the issue : the issue related to special chars is related on the code table that have not the same "int" value. So I've fixed this issue.
But I still have the "0" at all start of line (or after each line first char)

Please help

wow, sorry, you already made the diagnosis about code table.

now, about 0 at start of the line:
Epson:
your epson printer is printing ok, with no occurrences, isn't it?

Nixdorf:
may be the nixdorf TH210 isn't 100% compatible.
one possibility is to use https://github.com/anastaciocintra/escpos-coffee/wiki/Text-Styles#printmodestyle-plan-b
its because PrintModeStyle is more simple than Style and works well with greater number of printers.
complete code: https://github.com/anastaciocintra/escpos-coffee-samples/blob/master/usual/textprintmodestyle/src/main/java/TextPrintModeStyleSample.java

see you

I saw in https://www.dieboldnixdorf.com/-/media/diebold/ag-downloads/poslotterysystems/manuals/peripherals/thxxx/th210_programmersguidel_english.pdf

Select the emulation/software options sub-menu to set:
x Printer Mode
This function is used to set the printer emulation to Native, A794, A793 or Legacy emulation.
x Printer ID mode
This function is used to determine what printer ID value is returned in response to a Transmit
printer ID command (1D 49 n) when the printer is in A794 emulation mode. The printer can be
configured to send back the ID of the TH210, A794, A793 or Application Compatible Escape
Command systems.

lot of information, but it is one possibility (configure emulation mode)

now, about 0 at start of the line: Epson: your epson printer is printing ok, with no occurrences, isn't it?

Yes, with the Epson, all is OK.
With the Nixdorf, all lines have it... somes lines with only an "\n" and no styling also. I've inspected the outputstream in the debug mode and all seems perfect.

I've tried to override or check if i'ts a CRLF because the "0" takes the style of the previous chars .... so that seems a "end off line char" that is printed à the beginning of the next line.

lot of information, but it is one possibility (configure emulation mode)

I've seen that but no idea of how it works, and many tools of nixdor do not accept to install because do not detect any jdk and let me specify the location... :((

With the Nixdorf, all lines have it... somes lines with only an "\n" and no styling also. I've inspected the outputstream in the debug mode and all seems perfect.

In my humble opinion, you need another library or make one specific solution taking what matters from escpos-coffee , inheriting what works, and deploy your own solution.