Can't print receipt when the content include "€"

1,830 views
Skip to first unread message

hie...@hamsa.vn

unread,
Jul 14, 2017, 11:02:50 AM7/14/17
to qz-print
Hello,

I'm trying to print my receipt. For $, it is ok. But for "€", I can't print the receipt.

Could you help?

Thanks,

Lite Finocchiaro

unread,
Jul 14, 2017, 11:28:02 AM7/14/17
to hie...@hamsa.vn, qz-print
Can you share your code with us?

Sometimes, the printer's firmware limits the characters that may be printed. Some Epson models must be ordered with support for these languages, for example.

Also, have you used UTF-8 meta tags for your html page?


--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hie...@hamsa.vn

unread,
Jul 14, 2017, 12:09:38 PM7/14/17
to qz-print, hie...@hamsa.vn
Hello,

I'm using this printer to print my receipt: Antech AP250

And you can see the code here: https://www.dropbox.com/s/eaqmbec0fey5s1o/printer.model.js?dl=0

This is a React JS code we are using to print the receipt.

Just in case if you want to test our real product, you can try a demo here: https://demo.rockpos.com/16/v4/adm/index.php?controller=AdminLogin&email=fashio...@rockpos.com&password=demodemo

After login, see on the menu left "RockPOS", then choose "SELL". In the SELL page, you need to switch to "euro", then complete a sale to test print as I said.


Let me know if you need more information.


Thanks,

Tres Finocchiaro

unread,
Jul 14, 2017, 1:25:33 PM7/14/17
to Hiển Nguyễn Văn, qz-print
If this is working on a windows printer, please try to set the encoding to "UTF-8" in the API.

Like Lite stated, the hardware may not support it.

This is a public mailing list, so please change the password for your demo site.

We asked for a sample of code to reproduce.  This is the fastest because it doesn't require us to learn your application.

Your application attempts to use printers that would not normally be on our systems, so it's best to keep the questions about ESCP and printer compatibility in general.

When looking at the Java log, I see    1x  Ç 24.54  Ç 24.54

This is most likely due to Java's default encoding on Windows (CP1252).  UTF8 generally fixes this -- at least on the console.

Finally, sup...@qz.io is the preferred method for premium support.

-Tres


On Fri, Jul 14, 2017 at 12:09 PM, <hie...@hamsa.vn> wrote:
Hello,

I'm using this printer to print my receipt: Antech AP250

And you can see the code here: https://www.dropbox.com/s/eaqmbec0fey5s1o/printer.model.js?dl=0

This is a React JS code we are using to print the receipt.

Just in case if you want to test our real product, you can try a demo here: https://demo.rockpos.com/16/v4/adm/index.php?controller=AdminLogin&email=fashion-lisa@rockpos.com&password=demodemo


After login, see on the menu left "RockPOS", then choose "SELL". In the SELL page, you need to switch to "euro", then complete a sale to test print as I said.


Let me know if you need more information.


Thanks,

Vince

unread,
Jul 17, 2017, 3:23:54 AM7/17/17
to Tres Finocchiaro, qz-print

On Sat, Jul 15, 2017 at 12:25 AM, Tres Finocchiaro <tres.fin...@gmail.com> wrote:
UTF-8"

Hello Tres,


Thank you so much for your fast support.

About our demo, don't need to worry. it is public to everyone to test it. If someone changes the password we already have a backup.

Back to our problem with special characters on our receipt.

I've set the UTF-8 to the print function as you suggested. But without luck
Here is our code: http://take.ms/SINMM
Event change to "UTF-8", not "UTF8" it still doesn't work.

You can see the result here: http://take.ms/oh8lm

We already buy your "QZ Premium Support", so I hope we can get this done as soon as possible. A lot customer complain with us about it.

Many thanks,
Hien


Tres Finocchiaro

unread,
Jul 17, 2017, 10:48:39 PM7/17/17
to Vince, qz-print
According to the ESCPOS programming guide published by Epson, the euro symbol is available under Code Page PC858.

You can switch codepage using the ESC t command.  The "multilingual european" codepage is referenced as 19.  The euro currency symbol is hex D5.

ESC = 0x1B
t = 0x74
19 (dec) = 0x13
D5 (hex) = 0xD5

In JavaScript, this will look like:

'\x1B\x74\x13\xD5' + '500.00 FIVE HUNDRED EUROS'

Inline image 1

Vince

unread,
Jul 17, 2017, 10:52:47 PM7/17/17
to Tres Finocchiaro, qz-print
Hello Tres,

Thank you so much. I will take a look at it now. But it is only for EUROS characters. What happens to another text the same it. Like Vietnamese, Arabic,...

Ex in Vietnam we have this text: "Ứng dụng tốt"

Thanks,

Tres Finocchiaro

unread,
Jul 17, 2017, 10:54:50 PM7/17/17
to Vince, qz-print
Please reference ESCPOS manual.  We write and support the QZ Tray software.  We only offer raw printing advise as a courtesy.

As Lite stated:

Sometimes, the printer's firmware limits the characters that may be printed. Some Epson models must be ordered with support for these languages.

You must research the supported codepages of your printer.  Please use above technique to switch codepages and contact hardware vendor for list of supported languages. 

-Tres

Tres Finocchiaro

unread,
Jul 17, 2017, 11:05:00 PM7/17/17
to Vince, qz-print
Here is a good reference.  Notice there are many vietnamese code pages.


Please see all Vietnamese code tables.

You will need to research the following:

ESC = 0x1B
t = 0x74
19 (dec) = 0x13 (CODEPAGE) NEED TO CHANGE TO 30 (dec), 31 (dec),  or 52 (dec).
D5 (hex) = 0xD5 (CHARACTER) IF CAN FIND JAVA MATCH, MAY BE ABLE TO USE { encoding: XXXXX} and use Java version instead of UTF-8.



Vince

unread,
Jul 17, 2017, 11:10:01 PM7/17/17
to Tres Finocchiaro, qz-print

On Tue, Jul 18, 2017 at 10:04 AM, Tres Finocchiaro <tres.fin...@gmail.com> wrote:
Here is a good reference.  Notice there are many vietnamese code pages.

So it means we have to write a lot of translated text for each language? and for a lot of characters for each language too?

Ex: euro => encode, pound => encode,...

Thanks,

Vince

unread,
Jul 17, 2017, 11:11:22 PM7/17/17
to Tres Finocchiaro, qz-print
And in fact, the data pass to the printer is dynamic depending on client site. So we have to write a function to map a lot of words and pass to the printer?

Thanks

Tres Finocchiaro

unread,
Jul 17, 2017, 11:13:44 PM7/17/17
to Vince, qz-print
Yes.  If you find a codepage that works and if Java supports it, you can use Java to map the words.

Did you find a codepage that works?

Vince

unread,
Jul 17, 2017, 11:20:42 PM7/17/17
to Tres Finocchiaro, qz-print
Not yet, and in fact, I don't know java.


Oh, so I think the best way for our case now is passing a receipt PDF file to qztray to print. But I've tried it before, the quality is really not good :(.

--
You received this message because you are subscribed to a topic in the Google Groups "qz-print" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qz-print/V5_IM8_e6UA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qz-print+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Tres Finocchiaro

unread,
Jul 17, 2017, 11:33:28 PM7/17/17
to Vince, qz-print
Please be more specific if you require help.


Java has built-in support for 1258, so if that works, { encoding: 'cp1258' } and Java will convert for you.


If PDF is needed, please use { rasterize: false }

Vince

unread,
Jul 18, 2017, 2:06:38 AM7/18/17
to Tres Finocchiaro, qz-print
I've tried with your suggestion about euro character, but it doesn't work.

Added this to my receipt:


'\x1B\x74\x13\xD5' + '500.00 FIVE HUNDRED EUROS'


Vince

unread,
Jul 18, 2017, 7:32:31 AM7/18/17
to Tres Finocchiaro, qz-print
Hello Tres,

Is it possible for me to print a
+ type: 'raw'
+ format 'base64'
+ data: pdf data in base 64

Thanks,

Tres Finocchiaro

unread,
Jul 18, 2017, 9:14:28 AM7/18/17
to Vince, qz-print
I've tried with your suggestion about euro character, but it doesn't work. 

Please contact your hardware supplier for supported codepages.   PC858 should be pretty standard.

Is it possible for me to print a 
+ type: 'raw'
+ format 'base64'
+ data: pdf data in base 64

Not in 2.0, no.  We will eventually be supporting this feature in the experimental 2.1 branch.


 

Hiển Nguyễn Văn

unread,
Jul 20, 2017, 6:30:40 AM7/20/17
to qz-print, hie...@hamsa.vn
That's great!

Do you know when your team will be release the new version? I can't wait to see it :).

Thanks,

Tres Finocchiaro

unread,
Jul 20, 2017, 9:24:51 AM7/20/17
to Hiển Nguyễn Văn, qz-print
You can demo it now if interested:  https://github.com/tresf/tray/releases/tag/v2.1.0-RC1

We accept bug report against our GitHub repository for this version, we're just working out some bugs with a new "status" feature that reports back the printer's readiness state.
--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages