Click here to Skip to main content
14,270,306 members
Rate this:
Please Sign up or sign in to vote.
See more:
I need to print Arabic through the receipt printer using and I'm using the RawPrinterHelper to send the file but...the text file I created is not supporting Arabic.

I'm using FileOpen to create the file and PrintLine to write to the file. After that, I am passing the file to RawPrinterHelper. It not printing the Arabic characters. I tried UTF-8 for encoding to create the UTF-8 file, but that didn't work either.

How can i solve this?
Updated 20-Jan-11 5:47am
Sergey Alexandrovich Kryukov 20-Jan-11 10:46am
I don't know why creating a file, but... when the file is created, do you read Arabic using VS text editor (or, say, Notepad)? Do you write BOM?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I have no idea why you're creating a file. You just send the appropriate printer commands and data directly to the printer.

First, your printer has to support the Arabic character set. Then you may have to send a command sequence to the printer in order to tell it to use that set. That is information that's going to be in the manual for your printer.
Sergey Alexandrovich Kryukov 20-Jan-11 12:50pm
Dave, you're right about creating a file (see my comment).
However, I don't think your approach is productive. What, all depends on printer? Purely ad-hoc solution, for just one working place? Printout should present text as graphics.
Dave Kreskowiak 20-Jan-11 19:00pm
My approach isn't productive?? Excuse me, what I said was EXACTLY what is needed. We don't know which printer this guy has nor do we know anything about it's capablities. Without such information, it's impossible to tell him exactly what needs to be done to fix his problem.

The printout can only "print text as graphics" IF AND ONLY IF the printer he is using supports it! Not every printer on the market has the same capabilities, nor can every printer print graphics.
Dave, I still disagree, sorry. You see, I did not see a single printer which did't support graphics for many years: they all print different stupid Word documents with pictures, etc. At the same time I never saw a printer supporting Arabic in text mode, even though I did work with Arabic text. After all, you should know, that you can type Arabic in Windows or Linux text editor and print it out on practically any printer, I'll guarantee that.
So, I'll be happy if you proof me wrong...
Thank you,
Dave Kreskowiak 21-Jan-11 7:40am
This isn't your everyday laser printer he's talking about. This is a receipt printer. You have no idea what he's using, nor it's capabilities, not how old it is.

It's true that it probably does have this support as it may be a new printer he's using. It's entirely possible his printer prints ONLY graphics! The point is, he didn't specifiy any kind of information to give us any clue of what he's using. Without that, you can GUESS at an answer, but you cannot tell him anything definitively.
Sergey Alexandrovich Kryukov 21-Jan-11 20:33pm
That is something we should agree on. Thank your for this discussion.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100