0

I have star micronics mPOP 2-inch bluetooth printer and I have integrated star micronics iOS SDK into my application.

I can't print '£' symbol with star micronics sdk. Anyone knows what is the code to print £ symbol?

I found the similar question for other symbol but it doesn't meet my requirement.

URL : how to print € symbol with star micronics SDK?

Thanks in advance.

Community
  • 1
  • 1
Gaurang Makwana
  • 216
  • 2
  • 9
  • 1
    The first command in your linked answer selects cod page 858. https://en.m.wikipedia.org/wiki/Code_page_858 The £ symbol is 0x9c so you should send 9c instead of d5 – Paulw11 Aug 10 '16 at 07:35
  • @Paulw11 I tried with the 9c but it doesn't print the **£** symbol. **Here is the code.** [commands appendBytes:"\x1b\x1d\x74\x04" length:sizeof("\x1b\x1d\x74\x04")-1]; [commands appendBytes:"\x9C" length:sizeof("\x9C")-1]; – Gaurang Makwana Aug 11 '16 at 07:50
  • The sizeof doesn't look right to me. I think that was a mistake in the original answer just put 4 and 1 for length – Paulw11 Aug 11 '16 at 07:52

3 Answers3

0

Finally got the solution with following code.

Code to print '£' symbol.

[commands appendBytes:"\x1b\x1d\x74\x04"
               length:sizeof("\x1b\x1d\x74\x04")-1]; 
[commands appendBytes:"\x9c"
               length:sizeof("\x9c") - 1];

Here is the reference link for other symbols.

URL : https://en.m.wikipedia.org/wiki/Code_page_858

Thanks @Paulw11 for the help.

Gaurang Makwana
  • 216
  • 2
  • 9
0

You can use these documents to print any character using the character code tables to find the table and the character position: http://www.kioskproapp.com/api/StarPrinter/star-character-code-table.pdf

For example, the £ symbol would be on page 3, position 9C. You can then change the code page using the command ESC GS t n. where n is the page number.

"\x1b\x1d\x74\x03"

Find more info on this command at http://www.starmicronics.com/support/mannualfolder/starprnt_cm_en.pdf page 2-4.

Then you can simple print the £ sign by printing 9c

"\x9c"

Remember to change back to code page 0, or you might see some odd characters:

"\x1b\x1d\x74\x00"

If you can't find the character in any of the tables then you can save your own to memory. Check out this post for more info about that: Star micronics mpop iOS SDK - Save and print a character using the blank code page

Community
  • 1
  • 1
Eeshwar
  • 277
  • 3
  • 17
0

For someone landing on here from Android and have spent hours finding it. Do this:

builder.appendInternational(ICommandBuilder.InternationalType.UK); builder.append((byte) 0x23); //imagine searching through those numbers one by one!

Hiwa
  • 587
  • 6
  • 21