Closed ChrisONZ closed 10 months ago
Hey, I don't have a printer with me, so I can't reproduce your issue, but in case you haven't read these already, they might give you some insight on the issue:
https://github.com/lukevp/ESC-POS-.NET/issues/67 https://github.com/lukevp/ESC-POS-.NET/issues/77 https://github.com/lukevp/ESC-POS-.NET/issues/86 https://github.com/lukevp/ESC-POS-.NET/issues/88 https://github.com/lukevp/ESC-POS-.NET/issues/103
Hey, thanks for the direction, one of the examples helped.
the key was to use "ibm737" to represent the same as the Greek737 on the printer.... i had tried the "ISO-8859-7" page name previously
was then able to just pass the byte array(s) to my main printer routines...
foreach (RegisterSaleItem item in lstReceiptLines)
{
ItemDetails = string.Format("{0,2:D} {1,-25}{2,8}{3,9}%", item.SaleQuantity, item.ItemDesc, item.SaleTotalValue.ToString("##0.00"), item.VatPercent.ToString("#0.00"));
byte[] GreekBytes = Encoding.GetEncoding("ibm737").GetBytes(ItemDetails);
_printer.Write(ReceiptComponents.ReceiptLine(_ea, GreekBytes));
}
and use the code example
public static byte[][] ReceiptLine(ICommandEmitter e, byte[] LineDetails) => new byte[][] {
e.CodePage(CodePage.PC737_GREEK),
LineDetails,
e.PrintLine()
};
still cant print a Euro symbol, but that's not really needed for this project ( i did check your page about printing euro but it seems to leave my printer in the codpage for Euro and doesnt return back to the greek codepage....), im sure I'll figure it out if needed.
Thanks a lot for your pointers!
Hi,
I'm trying to create a receipt for a cafe, and will need to print Greek characters. Using your testing code, i have "cribbed" the following
}
using 737Greek from the vendors testing app (Its a Munbyn ITPP047P thermal) it all prints fine and i can see the character set is Greek.
but when i print using the above code, i get the following output - in the receipt lines, any Greek characters are replaced with odd symbols...
am I just using it incorrectly or could there be a problem, if the former, does anyone have an example of what i'm trying to do? I also note that just printing the greek characters from Notepad++ directly works. I have changed the enums to match the vendors CodePage number (in their case 42 for 737Greek) and selftest confirms that what the printer is set at. I've been looking at all sorts of snippets that suggest the strings have to have an encoding but no examples directly with this library, so many attempts have been unfruitful so far
i've tired all sorts based on various comments, even the below.... nothing but funny characters coming through - incredibly frustrating (in know its not related to your library - which is working GREAT btw, just hard to find a workable test sample of code).
any help would be very much appreciated - many thanks in advance!